diff options
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index 9e814ca0729..440f504c8f7 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -401,3 +401,10 @@ if (!Array.prototype.map){ return res; }; } + +/** + * Filter Jquery selector by attribute value + **/ +$.fn.filterAttr = function(attr_name, attr_value) { + return this.filter(function() { return $(this).attr(attr_name) === attr_value; }); +}; |