Thanks for your interest, however your first tip was not helpful until having replaced the 'mousedown' event with 'click': now the default event propagation is effectively stopped, but I'd like to somehow handle the animation on multiple subsequent clips.
Actually 'this.stop()' can do the trick and I suppose that if a '.bind(this)' is appended at the end of the function, then the scope wouldn't be wrong. https://github.com/3dolab/MooTabs/blob/master/Source/mootabs-0.1.0-nc.js#L189 Anyway the outcome is more or less the same, since a stop would only break the last stuff (the chain after slideFx/Fx.Morph) https://github.com/3dolab/MooTabs/blob/master/Source/mootabs-0.1.0-nc.js#L163 https://github.com/3dolab/MooTabs/blob/master/Source/mootabs-0.1.0-nc.js#L289 but on the other hand simply firing the event would insert it in the middle of the delay time related to the previous event. What I'm seeking is the right way to chain them. In addition, I'd like to merge the 'step' metod into 'setupTabs' (basically clones), well... by simply deleting the 'loop' conditions in the 'previousSlide'/'nextSlide' methods but I got errors: the fired event is being triggered but not passed to the listener, so that our 'e.stop()' results in a "e is undefined" error. I hope someone else could be interested in UI design and give suggestions, these new features are taking the already great MooTabs script to the cutting edge. and Ajax is around the corner! :) On 15 Lug, 17:10, Philip Thompson <[email protected]> wrote: > On Fri, Jul 15, 2011 at 7:54 AM, 3dolab <[email protected]> wrote: > > Hello, you probably already know MooTabs > >http://mootools.net/forge/p/mootabs > > Nope. > > I've successfully tested it with MooTools 1.3 and tried to add some > > > features, such as the 'loop' and 'totalTabs' options. I'm proud of the > > resulthttp://github.com/3dolab/MooTabs > > > However, ideas and tips are welcome, since I'd still like to: > > > 1- Chain subsequent clicks on next/prev button, animation is actually > > overlapping > > 2- Stop the default onmousedown event. Don't know why, but 'stop()' > > I don't believe you need to do "new Event(e).stop()" - I believe MT takes > care of creating a MT event before passed to your callback function. Just > do: > > e.stop(); > > And I'm not sure you want "this.stop()" - I'm guessing that's supposed to > reference _your_ stop method? However, your scope is wrong if that's the > intended functionality. > > var self = this; > tab.addEvent('mousedown', function (e) { > e.stop(); // Stop the default event and propogation > self.stop(); // Stop the player > > }); > > seems to fail > >https://github.com/3dolab/MooTabs/blob/master/Source/mootabs-0.1.0-nc... > > 3- Merge the 'step' method into 'setupTabs' > > Does that muddy things up? Happy coding. > > ~Philip > > --http://lonestarlightandsound.com/
