将元素设置为不透明动画并禁用单击

Setting elements to opaque animation and disabling clicks

本文关键字:单击 动画 不透明 元素 设置      更新时间:2023-09-26

所以我的jQuery是:

$('.wpcf7:hidden').parent().children().children().toggle(function(){
        $(this).css({opacity: '0.25'}, 200);
    },
    function() {
        $(this).css({opacity: '1'}, 200);
    }); // get all other hidden elements and set to opaque

但是,我不想要切换滑入和滑出功能。我只希望元素降低它们的不透明度,并禁用该元素中的所有链接。

感谢

试试这个。。。

$('.wpcf7:hidden').parent().children().children().toggle(function(){
        $(this).css({opacity: '0.25'}, 200);
    },
    function() {
        $(this).css({opacity: '1'}, 200);
    }).click(false);

$('.wpcf7:hidden').parent().children().children().toggle(function(){
            $(this).css({opacity: '0.25'}, 200);
        },
        function() {
            $(this).css({opacity: '1'}, 200);
        });
$('.wpcf7:hidden').parent().children().children().click(false);