: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* jQuery UI Effects Shake 1.13.3
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
//>>description: Shakes an element horizontally or vertically n times.
//>>docs: https://api.jqueryui.com/shake-effect/
//>>demos: https://jqueryui.com/effect/
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
return $.effects.define( "shake", function( options, done ) {
direction = options.direction || "left",
distance = options.distance || 20,
times = options.times || 3,
speed = Math.round( options.duration / anims ),
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
positiveMotion = ( direction === "up" || direction === "left" ),
queuelen = element.queue().length;
$.effects.createPlaceholder( element );
animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
element.animate( animation, speed, options.easing );
for ( ; i < times; i++ ) {
.animate( animation1, speed, options.easing )
.animate( animation2, speed, options.easing );
.animate( animation1, speed, options.easing )
.animate( animation, speed / 2, options.easing )
$.effects.unshift( element, queuelen, anims + 1 );