jquery:选择剩下css的所有兄弟:大于左的位置:元素的位置

如何通过css选择位于其右侧的元素的所有兄弟节点?
fiddle link

最佳答案
您可以使用filter()根据您提供的函数返回选择器的子集,请尝试以下操作:

var threeLeft = $("#three").position().left;
var $lis = $("ul li").filter(function() {
    return $(this).position().left > threeLeft;
});
$lis.css("border","1px solid #C00");

Example fiddle

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...