1) Script Title: Step Carousel Viewer v1.9
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm
3) Describe problem:
OK, I am very new to the javascript and jQuery world so this may well be a noob problem, which is with a single line of code in the setup param onslide:function.
To put it simply the issue I have is with jQuery's animate not being executed every time a panel is moved.
Let me explain...
The highlighted line is one that runs fine when the script is first loaded, i.e the first time, but upon sliding after this, it doesn't do anything. This is particularly annoying and even more baffling seeing as ...Code:<script type="text/javascript" charset="utf-8"> stepcarousel.setup({ galleryid: 'informationpage', //id of carousel DIV beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs panelclass: 'panel', //class of panel DIVs each holding content autostep: {enable:false, moveby:1, pause:3000}, panelbehavior: {speed:500, wraparound:false, persist:false}, defaultbuttons: {enable: true, moveby: 1, leftnav: ['/images/ico_navl2.png', 0, 0], rightnav: ['/images/ico_navr2.png', 0, 500]}, statusvars: ['currentPanel', 'sameascurrentPanel', 'totalPanels'], // Register 3 "status" variables contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file'] onslide:function(){ jQuery(document).ready(function(){ jQuery(".panel").css("margin-top", jQuery("#pageOptions").outerHeight(true) + "px") jQuery("#informationpage").animate({height: jQuery("#panel"+currentPanel).outerHeight(true) + "px"}, 500) }) } }); </script>
works exactly how I would want and expect it to work.Code:jQuery("#informationpage").css("height", jQuery("#panel"+currentPanel).outerHeight(true) + "px")
Could this be a script or jQuery error?
Any help would be much appreciated. I can't seem to find the answer anywhere through hours of searching.
Many thanks.



Reply With Quote


Bookmarks