开发者

jquery listeners conflict

开发者 https://www.devze.com 2023-04-04 09:46 出处:网络
Rule 1: on click event of span id=\"B\" sets the value of input box id=A to the text value of Div B. Rule 2: on blur event of text input box id=\"A\"

Rule 1: on click event of span id="B" sets the value of input box id=A to the text value of Div B.

Rule 2: on blur event of text input box id="A"

set the value of div B to blanks

When I click on A, then B, 开发者_如何学编程B is erased before the value of B is copied to A Is there a way to influence order of jQuery listeners?

I would like the click event to take presidence over the blur event.


try to add your clean code into setTimeout

setTimeout(function(){
    //Clean 
}, 10);

it should do it

0

精彩评论

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