Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
scrollToプラグインが現在スクロールしていることを検出するにはどうすればよいですか? jQuery:animatedセレクターのように。
:animated
if ( $('.ele').is(':animated') ) { $('.ele').animate({'left':'1000px'},5000); // .ele will only animate while it is not animating // i prevent repeat animation }
el = $('.ele'); if(!el.hasClass('scrolling')) { el.addClass('scrolling'); $.scrollTo( '#xxx', 1000, {onAfter: function() { el.removeClass('scrolling'); }}); }