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.
プラグインを作成していますが、イージングが利用可能かどうかを検出する必要があります。そうでないものを参照するとプラグインが失敗するからです。
イージングが存在しない場合は、にフォールバックしswingます。
swing
それで、どうすればこれを理解できますか?
jQuery.easingそれらを持っています。
jQuery.easing
if ('easeOutBounce' in jQuery.easing) { // Good to go }
$(this).animate( { bottom: 0 }, { duration: 100, easing: 'easeOutCubic' in $.easing ? 'easeOutCubic' : 'swing' } );