test for html5 data equality among a set of elements without a loop
When given a set of jQuery objects which all have the same data element,
asking for the value of that data by with regards to class gives me only
the first element.
<div class="Class" data-bool=false></div>
<div class="Class" data-bool=true></div>
var val = $(".Class").data("bool"); //false
without having to use $.each() and going through all of the elements, is
there a way to test for whether or not all their data values are equal?
No comments:
Post a Comment