开发者

why the second event is not started?

开发者 https://www.devze.com 2023-01-23 03:37 出处:网络
Please help me figure out why the second event is not started (full code) <input type=\"submit\" value=\"disabled:false\" />

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

精彩评论

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

关注公众号