开发者

why the second event is not started?

Please help me figure out why the second event is not started (full code)

<input type="submit" value="disabled:false" />

$(function(){
    $('input:submit').bind({
       mouseover : function(){
            $('input:submit').each(function(){
            开发者_如何学Go    $(this).attr('disabled', 'disabled');
                $(this).val('disabled:' + $(this).attr('disabled'));
            });
        },
        mouseout : function(){
            $(this).removeAttr('disabled');
            $(this).val('disabled:' + $(this).attr('disabled'));
        }
    });
});


Because you're disabling the control in your mouseover handler, so input messages are suppressed and mouseout never fires.


mouseout event's won't fire for disabled elements.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜