gpt4 book ai didi

javascript - 如何在删除和添加类后重新启用点击功能?

转载 作者:行者123 更新时间:2023-11-29 14:45:47 26 4
gpt4 key购买 nike

<分区>

我需要在删除和添加类后重新启用点击功能,这里是脚本示例

function prev() {
var click_lf = 0;
var click_dsb_lf = 0;


$('.sl-lft').on('click', function () {

var curr = parseInt($('.active-thumb').children('span').text().charAt(0));
click_lf += 1;
click_dsb_lf += 1;

if (click_dsb_lf <= 1) {
sc_right.removeClass('sl-lft-off').addClass('sl-lft').on('click'); // here is a problem
sc_left.removeClass('sl-lft').addClass('sl-lft-off').off('click');
// console.log('event');
console.log(click_dsb_lf);

}

if (click_lf == 3 || curr < 3) {
thmbs_wrp.animate({scrollTop: '-=' + '149px'}, 500);
click_lf = 0;
}


});

上一页();

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