summaryrefslogtreecommitdiffstats
path: root/jquery.once.min.js
blob: 5c222a8fdfbe4a7588053990578a4aec10b203ce (plain)
1
2
3
4
/*! jQuery Once - v2.0.0-alpha.6 - 10/7/2014 - https://github.com/RobLoach/jquery-once
 * (c) 2014 Rob Loach (http://github.com/robloach)
 * Licensed GPL-2.0, MIT */
!function(a){"use strict";"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b={},c=0;a.fn.once=function(d){"string"!=typeof d&&(d in b||(b[d]=++c),d=b[d]);var e="jquery-once-"+d;return this.filter(function(){return a(this).data(e)!==!0}).data(e,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+a)},a.fn.findOnce=function(b){var c="jquery-once-"+b;return this.filter(function(){return a(this).data(c)===!0})}});