Tip: Click lines to highlight, hold ctrl/cmd to multi-select
filterData plugin (3-Apr @ 15:42)
Useful to filter a jQuery selector by the data attached to the element.
Syntax Highlighted Code
- $.fn.filterData = function (k, v) {
- return this.filter(function () {
- return ($(this).data(k) == v);
- });
- };
Plain Code
$.fn.filterData = function (k, v) {
return this.filter(function () {
return ($(this).data(k) == v);
});
};