zurb / orbit

454 stars 96 forks source link

Problem with multiple afterSlideChange #98

Closed robrobsen closed 12 years ago

robrobsen commented 12 years ago

Hi I use orbit 1.3.0 I create 3 orbits like this:

$('name1').orbit({ animation: 'horizontal-slide', // fade, horizontal-slide, vertical-slide, horizontal-push animationSpeed: 800, // how fast animtions are timer: true, // true or false to have the timer // Zeit zwischen Wechsel advanceSpeed: 4000, // if timer is enabled, time between transitions pauseOnHover: false, // if you hover pauses the slider startClockOnMouseOut: false, // if clock should start on MouseOut startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again directionalNav: false, // manual advancing directional navs captions: false, // do you want captions? captionAnimation: 'fade', // fade, slideOpen, none captionAnimationSpeed: 800, // if so how quickly should they animate in bullets: false, // true or false to activate the bullet navigation bulletThumbs: false, // thumbnails for the bullets bulletThumbLocation: '', // location from this file where thumbs will be afterSlideChange: function(){ document.write("-------CHANGE-------"); viewUpdate(); } }); and two similars with other name (name2, name3) If I test the afterSlideChange function with one orbit, it will works fine. But if I try it with multiple orbits (different names!), I receive an infinite loop in the function document.write("-------CHANGE-------"); viewUpdate();

What I have to do?