How to enable dblclick event on elements which was binded with JQuery UI Selectable plugin?

后端 未结 6 803
感动是毒
感动是毒 2020-12-19 06:21

In my case,I have an UL with JQuery UI Selectable plugin applied,but at the same time ,I want the item witch was binded with selectable plugin was

6条回答
  •  再見小時候
    2020-12-19 06:47

    $("#selectable li").mousedown(function(event) {
        if(event.which==1)
        {
            if($(event.currentTarget).data('oneclck')==1)
            {
                alert('click');
    
                return false;
            }
            else
            {
                $(this).data('oneclck', 1);
                setTimeout(function(){
                    $(event.currentTarget).data('oneclck', 0);
                }, 200);
            }
        }
    });
    

提交回复
热议问题