Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图同时淡出几个对象,这是我的代码:
$("#close-case-study").click(function() { $("#case-study-btns").fadeOut(500); $("[id$='-discover']").fadeOut(500);
});
问题是它们不同步一个开始然后另一个紧随其后。我究竟做错了什么?是否因为第二个选择器正在寻找多个 id 以 -discover 结尾的项目?
也许这会有所帮助:
$("#case-study-btns, [id$='-discover']").fadeOut(500);
$("#close-case-study").click(function() { $("#case-study-btns, [id$='-discover']").fadeOut(500); });