[jQuery] Re: prevent object from being clicked until animation is over

2009-05-01 Thread slengteng
tx for tip. i did it like this and it works fine: $('#gallery img').click(function() { if ( !$('#gallery img').is(':animated') ) {... On 1 Maj, 19:17, Ricardo wrote: > $(el).click(function(){ >    if ( $(this).is(':animated') ) >       return false; >    //... > > }); > > On May 1,

[jQuery] Re: prevent object from being clicked until animation is over

2009-05-01 Thread waseem sabjee
Hi Ricardo. would e.preventDefault() work in place of return false ? On Fri, May 1, 2009 at 7:17 PM, Ricardo wrote: > $(el).click(function(){ > if ( $(this).is(':animated') ) > return false; > //... > }); > > On May 1, 1:16 pm, slengteng wrote: > > As in topic. I have dynamic gallery c

[jQuery] Re: prevent object from being clicked until animation is over

2009-05-01 Thread Ricardo
$(el).click(function(){ if ( $(this).is(':animated') ) return false; //... }); On May 1, 1:16 pm, slengteng wrote: > As in topic. I have dynamic gallery containing just 3 elements: > > http://szycha.kylos.pl/test/gal.htmlhttp://szycha.kylos.pl/test/js/gallery.js-script > > Problem occ