Add check for jQuery slim version

jQuery has released with jQuery 3.1.1 a 'slim' version that excludes easing. jQuery Easing Plugin tries to preserve the original jQuery 'swing' easing by default. A check was added to prevent error messages.
This commit is contained in:
dwebbuilder
2017-10-03 20:15:50 +02:00
parent fdf871b0e1
commit afff17bd8f
2 changed files with 4 additions and 2 deletions

View File

@@ -19,7 +19,9 @@
})(function($){
// Preserve the original jQuery "swing" easing as "jswing"
$.easing['jswing'] = $.easing['swing'];
if (typeof $.easing !== 'undefined') {
$.easing['jswing'] = $.easing['swing'];
}
var pow = Math.pow,
sqrt = Math.sqrt,