I have elements that I want to choose from,
and I want to choose only the elements that have margin-left smaller than 1开发者_如何学运维00 pixels but bigger than 0.Is that possible in jQuery?
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();
精彩评论