summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/libs/jquery.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/libs/jquery.js')
-rw-r--r--addons/web/static/src/js/libs/jquery.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js
index 7c3273abc91..471d07bb980 100644
--- a/addons/web/static/src/js/libs/jquery.js
+++ b/addons/web/static/src/js/libs/jquery.js
@@ -92,15 +92,15 @@ $.fn.extend({
},
/**
* Makes DOM elements bounce the way Odoo decided it.
+ *
+ * @param {string} [extraClass]
*/
- odooBounce: function () {
- return this.each(function () {
- var $el = $(this);
- $el.addClass('o_catch_attention');
- setTimeout(function () {
- $el.removeClass('o_catch_attention');
- }, 400);
- });
+ odooBounce: function (extraClass) {
+ for (const el of this) {
+ el.classList.add('o_catch_attention', extraClass);
+ setTimeout(() => el.classList.remove('o_catch_attention', extraClass), 400);
+ }
+ return this;
},
/**
* Allows to bind events to a handler just as the standard `$.on` function