jcarousel auto cycle / turn -


i used jcarousel doing somemthing that: carousel autoscrolling not.

i created custom.js file add js. , jcarousel part used code:

$(function() {      $.fn.startcarousel = function() {         var bodywidth = $('body').width(),             itemwidth = $('.mycarousel li').outerwidth(true),                    mycontwidth = bodywidth > itemwidth ? bodywidth - bodywidth%itemwidth : itemwidth,             licount = $('.mycarousel li').size(),             jscroll = 1;          if(licount > mycontwidth/itemwidth){             jscroll =  mycontwidth/itemwidth;         } else {             jscroll = 0;             mycontwidth = licount * itemwidth;         }          $('.mycont').width(mycontwidth);          $('.mycarousel').jcarousel({             scroll:jscroll         });     };      $(this).startcarousel();      $(window).resize(function(){         $(this).startcarousel();     });      var carousel = $('.mycarousel');     $(carousel).jcarousel({         scroll:1,         wrap: 'circular'     });      carousel.touchwipe({         wipeleft: function() {             carousel.jcarousel('next');         },         wiperight: function() {             carousel.jcarousel('prev');         }     });  }); 

i tried:

var carousel = $('.mycarousel'); $(carousel).jcarousel({     auto:2,     scroll:1,     wrap: 'last' }); 

or wrap: 'circular' did not work well.

thank help!

try this:

<script>   $(function() {     $("#carouselcontaineridhere").jcarousellite({         btnnext: "#carouselcontaineridhere .next",         btnprev: "#carouselcontaineridhere .prev",         speed: 500,         auto: boo     });     }); var boo = "true"; if($content.boo.value)     boo = $content.boo.value; </script> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -