Jquery 如何将css仅应用于我在循环中单击的按钮旁边的元素
这是我的HTML代码,它们都在一个循环中:Jquery 如何将css仅应用于我在循环中单击的按钮旁边的元素,jquery,html,css,Jquery,Html,Css,这是我的HTML代码,它们都在一个循环中: $(.edit1_hidden”)。在(“单击”,函数()上{ $(this.css(“显示”、“无”); $(“按钮+.edit_hidden”).show(); }); 。编辑\u隐藏{ 显示:无; } 编辑 您可以使用$(this)。下一步(“.edit\u hidden”).show() 这将显示单击按钮后的表单 演示 $(.edit1_hidden”)。在(“单击”,函数()上{ $(this.css(“显示”、“无”); $(this
$(.edit1_hidden”)。在(“单击”,函数()上{
$(this.css(“显示”、“无”);
$(“按钮+.edit_hidden”).show();
});代码>
。编辑\u隐藏{
显示:无;
}
编辑
您可以使用$(this)。下一步(“.edit\u hidden”).show()
这将显示单击按钮后的表单
演示
$(.edit1_hidden”)。在(“单击”,函数()上{
$(this.css(“显示”、“无”);
$(this).next(“.edit_hidden”).show();
});代码>
。编辑\u隐藏{
显示:无;
}
编辑
编辑
天哪,先生,你把我从地狱里救了出来。非常感谢你,我这周一直在努力寻找解决方案。非常感谢你,你不会相信我有多高兴@VishwajeetGade乐意帮忙
$(".edit1_hidden").on("click", function() {
$(this).css("display", "none");
$(this).next(".edit_hidden").show();
});