Ajax Autocomplet unbind on second access throw jquery simplemodal
I'm using jquery simplemodal to open a popup form which include ajax autocomplete inputs, the first time access to the modal this autocompletes works fine, but when i close it and reopen the modal the autocomplete are not longer binded to the functions开发者_JS百科 of ajax, any clue? i set the close as the default nothing else and not using live....
I'm having the same issue - it seems broader than autocomplete though - I'm loosing all jquery bindings on the second open, so I'm pretty sure it's a simplemodal issue. To get around the autocomplete issue I loaded it on the simplemodal open (and unloaded on close). Still looking for a better solution!
$dialog.modal({
onShow: function(event, ui) {
$('#an-autocomplete-input').autocomplete();
},
onClose: function(event, ui) {
$('#an-autocomplete-input').autocomplete( "close" );
$.modal.close();
}
});
精彩评论