Reputation: 8206
I have elements that I want to choose from,
and I want to choose only the elements that have margin-left
smaller than 100 pixels but bigger than 0.
Is that possible in jQuery?
Upvotes: 1
Views: 817
Reputation: 816404
You can use filter
(assuming elements
is a jQuery object):
elements.filter(function() {
var margin = parseInt(this.style.marginLeft, 10);
return margin > 0 && margin < 100;
}).something();
Upvotes: 4