/ Published in: HTML
Pared down example...
Using serialScroll 1.2.2, scrollTo 1.4.2
Using serialScroll 1.2.2, scrollTo 1.4.2
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
div id="carousel-container"> <div id="paging"> <ul> </ul> </div> <div id="horizontal_carousel"> <div class="container" id="divResults"> <ul> </ul> </div> </div> </div> // Javascript (called from an external file) jQuery(function( $ ){ var $nav = $('#paging li a'); $('#carousel-container').serialScroll({ target:'#divResults', items:'li', prev:'div.previous_button', next:'div.next_button', axis:'xy', duration:700, force:true, exclude:3, step:4, jump:false, navigation:$nav, onBefore:function( e, elem, $pane, $items, pos ){ $nav.removeClass('current-link'); $nav.eq(pos).addClass('current-link'); e.preventDefault(); if( this.blur ) this.blur(); } }); //end serial scroll init } )