Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To get it to constantly rotate you should be able to set auto:.1 and animation:5000 (or whatever speed you want. Below is an example that took me a long time to get going correctly. It is getting data through jQuery AJAX.</p> <pre><code> var lis; //Global variable holding the data. var myCarousel01; //Global variable holding the carousel. $(document).ready(function () { updateData(); $("#tableapp").ajaxStop(function () { InitiateCarousels(); } rebindCarousels(); }); }); function updateData() { $.get('AjaxPages/ApplicationMonitor.aspx', function (data) { lis = $(data).find("li"); }); } function InitiateCarousels() { jQuery('#mycarousel1').jcarousel({ wrap: 'circular', auto:.1, //Amount of time you want slide to stop in seconds animation:5000, //Desired speed in milliseconds easing:"linear", //Prevents the slides from "slowing down" initCallback: myCarousel01_initCallback, itemFirstInCallback: myCarousel01_itemFirstInCallback }); }); function myCarousel01_initCallback(carousel, state) { if (state == "init") { myCarousel01 = carousel; //Bind carousel to global variable so you can retrieve it later. } } function rebindCarousels() { //This function gets called after data is binded to the lis variable. See: "ajaxStop" function above. //Rebind Carousel01 myCarousel01.list.empty(); $.each(lis, function (i, l) { myCarousel01.add(i + 1, l); }); myCarousel01.size(lis.length); } </code></pre> <p>Hope this helps someone. It took a while to get this working and I did a rough copy/paste here so it may take a little tweaking. If this helps, please mark it as answered. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload