summaryrefslogtreecommitdiffstats
path: root/jquery.once.min.js
blob: 6173fab9418ea3aeca8f6a0e3e703ce247b71947 (plain)
1
2
3
4
/*! jQuery Once - v2.0.0-alpha.10 - 11/3/2014 - https://github.com/RobLoach/jquery-once
 * (c) 2014 Rob Loach (http://github.com/RobLoach)
 * Licensed GPL-2.0, MIT */
(function(){!function(a){"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b;b=0,a.fn.once=function(b){var c;if(!b)throw new Error("An ID is required when calling jQuery.once()");return c="jquery-once-"+b,this.filter(function(){return a(this).data(c)!==!0}).data(c,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+a)},a.fn.findOnce=function(b){var c;return c="jquery-once-"+b,this.filter(function(){return a(this).data(c)===!0})}})}).call(this);