Controlling jQuery Cycle with jQuery UI slider widget? -
i'm wondering whether there's easy way control image slideshow have working jquery cycle ui slider widget.
cycle code is:
$(window).load(function(){ $('.foo').cycle({ timeout : 80, speed : 80 , startingslide : 0, }); });
and widget such:
$(function() { $( "#slider-vertical" ).slider({ orientation: "vertical", range: "min", min: 0, max: 300, value: 300, slide: function( event, ui ) { $( "#amount" ).val( ui.value ); console.log(ui.value); } }); $( "#amount" ).val( $( "#slider-vertical" ).slider( "value" )); });
any ideas on cycle options might manipulated values ui widget spitting out? thank you!
sorry, usual solved right after posting.
jquery cycle code remains same:
$(window).load(function(){ $('.foo').cycle({ timeout : 80, speed : 80 , startingslide : 0, }); });
and changed ui widget code (see last line) such, pass widget value cycle. value sets active slide.
$(function() { $( "#slider-vertical" ).slider({ orientation: "vertical", range: "min", min: 0, max: 300, value: 300, slide: function( event, ui ) { $(".foo").cycle(ui.value); } }); });
Comments
Post a Comment