PDA

View Full Version : featured content glider v2.5 auto glide stops once i click the pagination link



developerhusain
05-21-2013, 05:15 AM
Hi.
Developer husain
featured auto content glider v2.5 worked really fine for me but once i click any of pagination link. It stops its auto gliding.In my case i want it auto glide always. How do i resolve this problem. Any thoughts on this friends

jscheuer1
05-26-2013, 01:24 PM
.

Warning: In the future, please include a link to the DD script(s) in question in your post. See this post (http://www.dynamicdrive.com/forums/showpost.php?p=7) for more information.

That said, simply modify the on page init as shown:


<script type="text/javascript">
featuredcontentglider.init({
gliderid: "canadaprovinces", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerid: "p-select", //ID of toggler container
remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
selected: 0, //Default selected content index (0=1st)
persiststate: false, //Remember last content shown within browser session (true/false)?
speed: 500, //Glide animation duration (in milliseconds)
direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
autorotate: true, //Auto rotate contents (true/false)?
autorotateconfig: [3000, 0], //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
restart: 3000, //milliseconds to add to milliseconds_btw_rotations as a pause before resuming after a nav button is clicked
onChange: function(previndex, curindex, $allcontents){ // fires when Glider changes slides
//custom code here
var glider = this, restart = this.restart | 0, timeOutName = this.togglerid + 'timer';
this.$togglerdiv.click(function(){
clearTimeout(window[timeOutName]);
window[timeOutName] = setTimeout(function(){featuredcontentglider.autorotate(glider);}, restart);
});
this.onChange = function(){};
}
});

</script>



Notice the red 3000 for the added restart property It will give you fine tuned control over how long it takes before the glider resumes after a nav button is clicked.

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.