如何从项目列表中过滤当前项目。例如。
$('.div').click(
function (){
$(this).val('this is clicked');
//! get the items that are not clicked
}
)
$('.div')
返回一个项目列表,其中一个项目被单击。如何获取未点击的项目列表。
注意:我并不是在寻找向单击的项目(或未单击的项目)添加属性并对其进行过滤的解决方案。
最佳答案
$('.div').click(
function (){
$(this).val('this is clicked');
var others = $(".div").not($(this));
}
)
关于jquery - 过滤除此之外的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5209570/