jquery - Any way to get all the id's (attribute) of all elements of a concrete class? -


Any method of getting all the IDs (attributes) of all elements of the concrete square using jQuery?

Regards

javi

Maybe something like that?

  var ids = []; $ ('. MyClass'). Each (function () {ids.push ($ (this) .attr ('id')); // id.push (this.id) will also work.});    

Comments