Javascript woes today... I'm struggleing to get a selector right.
I need to select elements, that don't have jqmData(bound) === true
in a jQuery chained statement. This is what I have:
var swipesOnPage = $('div.photoswipeable');
...
swipesOnPage.not(':jqmData(bound="true")')
.jqmData('bound', true )
.each( function(){
// do stuff
});
I need to flag lables that received their "treatment" so I'm not re-running code on them. However I cannot get the selector right, so all elements, which I have set jqmData("bound",true)
get re-selected every time.
Question:
How to use the not
or filter
statement correctly with data-attribute?
Thanks!