How can I get all attributes (e.g. href
) of all elements matching a jQuery selector?
Something like
var idArray = $(".someClass").map(function(){
return this.id
}).get().join(',');
Working demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With