javascript - How to check that a jQuery easing method is defined -
how can check see specific easing method defined? example, jquery includes 2 methods ("linear" , "swing"), jquery ui has bunch more , there third-party plugins have more methods. in plugin, let developers specify easing method them include proper files define methods, want check , display error if have specified easing method not exist.
i believe should easy as:
jquery.easing['swing'] != undefined // -> true jquery.easing['foobar'] != undefined // -> false
Comments
Post a Comment