Reputation: 834
How can I select an element by left position?
I want to do something like this:
$(".timeline_item").find("Where left position === 300");
Upvotes: 0
Views: 99
Reputation: 12841
Something like this should work
$(".timeline_item").filter(function() {
return $(this).css("left") == 300;
});
Upvotes: 0
Reputation: 160863
You could check it with .position()
:
$(".timeline_item").filter(function() {
return $(this).position().left == 300;
});
Upvotes: 0
Reputation: 222198
This will return all .timeline_item
with left == 300
$(".timeline_item").filter(function() {
return $(this).css("left") == 300;
});
Upvotes: 3