开发者

Jquery live return false issue

issue jquery return false not working exactly.

$("input").live("mouseup",function()
{
return false
});

// Outside click action
$(document).mouseup(开发者_如何学Cfunction()
{
$("input").hide();
});

Demo link

http://demos.9lessons.info/table_edit/TableEdit.htm


Try to use stopImmediatePropagation()

$("input").live("mouseup", function(e) {
    e.stopImmediatePropagation();
});

// Outside click action
$(document).mouseup(function() {
    $("input").hide();
});

Code example on jsfiddle.


$("input").live("mouseup",function(e) {
    e.preventDefault();
    e.stopPropagation();
});


Try this:

 jQuery(document).ready(function() {
$("input").live("mouseup",function(event)
{
    return false;
});
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜