开发者

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();
  }
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜