JSFiddle - React, Tailwind, and code Playground
by jakie8
JavaScript
/*
* I propuse using this code.
* The .stop() function will prevent event queing.
*/
l.prototype.togglePanel = function(m) {
var n;
if (this.panelLocked) {
return
}
n = this.container.find(".gallery_side_panel");
if (m === true && !n.hasClass("poppedOut")) {
this.initAd();
n.addClass("poppedOut").stop().animate({
right: -331
});
return this.panelOn = true
} else {
if (m === false && n.hasClass("poppedOut")) {
n.removeClass("poppedOut").stop().animate({
right: 20
});
return this.panelOn = false
}
}
};