How to select all siblings of an element that are positioned to the right of it via css? fiddle link
You can use filter()
to return a subset of a selector based on a function you provide, try this:
var threeLeft = $("#three").position().left;
var $lis = $("ul li").filter(function() {
return $(this).position().left > threeLeft;
});
$lis.css("border", "1px solid #C00");
Example fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With