Skip to content

Commit e5d2169

Browse files
committed
Method api.modal.confirm fixed by implementing the missing JQuery extension .once
1 parent b1d1c97 commit e5d2169

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/js/api.plugin.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ var api = api || {};
77
// Set
88
api.plugin = api.plugin || {};
99

10+
/*******************************************************************************
11+
API - Plugin - JQuery extensions
12+
*******************************************************************************/
13+
14+
//Unbind all events prior to binding a new event using .on
15+
(function ($) {
16+
$.fn.once = function () {
17+
return this.off(arguments[0]).on(arguments[0], arguments[1]);
18+
};
19+
})(jQuery);
20+
1021
/*******************************************************************************
1122
API - Plugin - Return To Top
1223
*******************************************************************************/

0 commit comments

Comments
 (0)