自定义手风琴禁用 jquery 中的点击
无法禁用“活动”状态。有什么想法吗?
因此,当用户单击手风琴选项卡之一时,我希望禁用当前活动选项卡。
$(document).ready(function () {
$(".accordion h5:first").addClass("active");
$(".insides:not(:first)").hide();
$(".insides:first").show();
$(".accordion h5").click(function () {
$(this).next(".insides").slideToggle("fast")
//$(this).next("innards").slideToggle("fast")
.siblings(".insides:visible").slideUp("fast");
$(this).toggleClass("active");
$(this).siblings("h5").removeClass("active");
});
});
Having trouble disabling the "active" state. Any thoughts?
So when a user click on one of the accordion tabs, I would like to have the currect active tab disabled.
$(document).ready(function () {
$(".accordion h5:first").addClass("active");
$(".insides:not(:first)").hide();
$(".insides:first").show();
$(".accordion h5").click(function () {
$(this).next(".insides").slideToggle("fast")
//$(this).next("innards").slideToggle("fast")
.siblings(".insides:visible").slideUp("fast");
$(this).toggleClass("active");
$(this).siblings("h5").removeClass("active");
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)