我如何将相邻的选择器“+”与 $(this) 一起使用。
我需要注释行的帮助//this doesn't work:
$(".ExpandCollapse").click(function () {
if ($(this).nextUntil('.Collapsable').is(':visible'))
{
//this doesnt work
$(this + ".Collapsable").hide();
}
else
{
//this doesnt work
$(this + ".Collapsable").show();
}
});
你能帮我一下吗?
非常感谢。
最好的问候。
何塞
最佳答案
关于javascript - 使用 $(this) 查询下一个相邻选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3413435/