Last active
February 2, 2018 06:08
-
-
Save fisknils/b1765594dde4c2f76c49dd05b12fcabf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
/* returns an array containing the attr values of matching elements */ | |
jQuery.fn.extend({ | |
eachattr: function(attr){ | |
let r = []; | |
$(this).each(function(){ | |
r.push($(this).attr(attr)); | |
}); | |
return r; | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment