jQuery textbox change event doesn't fire until textbox loses focus?

后端 未结 7 1076
执念已碎
执念已碎 2020-12-04 06:06

I found that jQuery change event on a textbox doesn\'t fire until I click outside the textbox.

HTML:


         


        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 07:05

    Reading your comments took me to a dirty fix. This is not a right way, I know, but can be a work around.

    $(function() {
        $( "#inputFieldId" ).autocomplete({
            source: function( event, ui ) {
                alert("do your functions here");
                return false;
            }
        });
    });
    

提交回复
热议问题