相关疑难解决方法(0)

触摸事件两次射击

我在移动设备/平板电脑上遇到问题,事件发生两次.当我单击以下功能时,应该下拉的菜单将下拉,然后immediataly滑回.这只是触控设备的问题.

$(document).on("touchend click", ".lines-button", function(e){

    e.stopImmediatePropagation();
    if($(this).hasClass("close")){
        $(this).removeClass("close");
        $(".widget1x1Back").next(".actionsHolder3").slideUp("fast", function() {
            $(this).remove();
        });             
    }else{

        var iconsList = $(this).closest(".top1x1").next(".hdnActnLst").find(".iconsHolder3").html();
        $(this).closest(".widget1x1").append(iconsList);
        $(this).closest(".widget1x1").find(".actionsHolder3").hide();
        $(this).closest(".widget1x1").find(".actionsHolder3").slideDown(700,"easeOutBack");
        $(this).addClass("close");
    }
});
Run Code Online (Sandbox Code Playgroud)

任何输入都会很棒,谢谢!!

mobile jquery events event-handling touch

8
推荐指数
2
解决办法
8775
查看次数

标签 统计

event-handling ×1

events ×1

jquery ×1

mobile ×1

touch ×1