$(document).ready(function(){ /*$('#img-slider li').bind({ reposition: function() { var degrees = $(this).data('roundabout').degrees, roundaboutbearing = $(this).parent().data('roundabout').bearing, rotatey = math.sin((roundaboutbearing - degrees) * (math.pi/180)) * 9; $(this).css({ "-webkit-transform": 'rotate(' + rotatey + 'deg)', "-moz-transform": 'rotate(' + rotatey + 'deg)', "-ms-transform": 'rotate(' + rotatey + 'deg)', "-o-transform": 'rotate(' + rotatey + 'deg)', "transform": 'rotate(' + rotatey + 'deg)' }); } });*/ $('.jq_sliderprev').on('click', function(){ $('#img-slider').roundabout('animatetonextchild'); return false; }); $('.jq_slidernext').on('click', function(){ $('#img-slider').roundabout('animatetopreviouschild'); return false; }); $('body').on('keyup', function(e) { var keycode = e.which || e.keycode; if(keycode == 37) { $('#img-slider').roundabout('animatetopreviouschild'); e.preventdefault(); return false; } else if(keycode == 39) { $('#img-slider').roundabout('animatetonextchild'); e.preventdefault(); return false; } }); $('.jq_sliderswitch li').on('click', function() { var $elem = $(this); var index = $elem.index(); $('#img-slider').roundabout('animatetochild', index); return false; }); /* $('#img-slider li').roundabout({ enabledrag: true })*/ $('#img-slider').roundabout({ minscale: 0.7, maxscale: 1, duration: 750, easing:"tight", maxz:600, autoplay:true, autoplayduration:3000 }); });