开发者

child combo doesnot get populated on changing parent combo on up/down key press while navigated through tab control

开发者 https://www.devze.com 2023-01-22 19:26 出处:网络
i have 2 combobox A & B.. the values in B is populated according to selected value in A,, my code works fine when i click combo A and select a item,, the values according to开发者_如何学Go it get

i have 2 combobox A & B.. the values in B is populated according to selected value in A,, my code works fine when i click combo A and select a item,, the values according to开发者_如何学Go it get populated on combo B. i have written it on the change event...

But when i use tab to navigate and select the items in combo A and change on pressing keyboard down key...the items in combo B is not getting populated with new values.. existing values does not get changed,,, ie change event is not getting fired... how can i manage it in down/up key in keyboard when using tab,,,,


You can solve this by binding to both the change and keyup events:

 $(".yourClass").bind("change keyup", function() {
    alert("changed");
});

jsFiddle example

0

精彩评论

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

关注公众号