gpt4 book ai didi

php - 具有禁用内容的 jQuery

转载 作者:太空宇宙 更新时间:2023-11-04 16:16:48 24 4
gpt4 key购买 nike

我的 jquery 代码有问题,它在我单击下一个配置文件后禁用所有文本。

图 1:你会注意到我可以在第一帧中突出显示文本并突出显示滚动条。

enter image description here

图 2:你会注意到这里没有一个是突出显示的。

enter image description here

这是我当前使用的 jquery 源。

    $(document).ready(function(){
$('.productList').hide(); // hide all details

$('#thumbsets li').bind('click',function() {
var tsLi = $(this).index(); // all elements have already an index
$('.productList:eq('+ tsLi +')').siblings().fadeTo(400,0).end().fadeTo(400,1);
});
});

我在我所有的投资组合部分都使用它。其中大部分是图像。但是,我尝试使用此脚本函数创建用户配置文件示例列表,但我发现在我的导航切换到下一个配置文件成员后,它已经被禁用(技术上说,我无法滚动或突出显示文本内容) .

有没有办法调整这里的脚本?我怀疑我的问题的原因是:

            var tsLi = $(this).index(); // all elements have already an index
$('.productList:eq('+ tsLi +')').siblings().fadeTo(400,0).end().fadeTo(400,1);

希望有人能帮我解决这个问题。提前致谢。

最佳答案

fadeTo docs仅操纵不透明度。所以褪色的元素变得不可见,但仍然存在并位于其他元素之上..(所以你不能突出显示那些..)

你应该使用fadeIn docsfadeOut docs相反,因为它们也会隐藏/显示元素。

$('.productList:eq('+ tsLi +')').siblings().fadeOut(400).end().fadeIn(400);

关于php - 具有禁用内容的 jQuery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7340459/

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