gpt4 book ai didi

用于工作选项卡的 jQuery 1.5.1 脚本

转载 作者:太空宇宙 更新时间:2023-11-04 03:35:31 25 4
gpt4 key购买 nike

你能帮我使用 1.5.1 版的 jQuery 编写选项卡脚本吗?

我已经设置了 html、css 代码。早些时候我尝试使用 1.5.1 来做,但没有做对。但是使用 jQuery 1.8.3 工作正常我不知道为什么我的脚本不能与 1.5.1 一起工作。

出于这些原因,我需要使用 1.5.1。您的解决方案将不胜感激。

http://jsfiddle.net/uc3gzxye/' 这是我目前所拥有的。

非常感谢!

最佳答案

on() 函数曾经被称为 live()

我已经更新了你的 fiddle ,它可以在 1.6 中工作,并且有望在 1.5 中工作

jQuery('.tabs .tab-links a').live('click', function(e)  {
var currentAttrValue = jQuery(this).attr('href');

// Show/Hide Tabs
jQuery('.tabs ' + currentAttrValue).show().siblings().hide();

// Change/remove current tab to active
jQuery(this).parent('li').addClass('active').siblings().removeClass('active');

e.preventDefault();
});

关于用于工作选项卡的 jQuery 1.5.1 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25634389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com