ユーザーが入力フォームで国の名前を変更した後に実行される jQuery セレクターがあります。ただし、国フィールドが変更された後、住所入力フィールドが変更され、ページ全体がリロードされることなく動的に更新されます。
質問: インライン/部分ページ更新後に、JQuery アクセス/新しい入力フィールドへのセレクターの伝達を行うにはどうすればよいですか?
例:
jQuery('[id^="Country"]').on('mouseup', function(e) {
// code gets here okay... the problem is it doesn't call the the following after the page refresh...
});
jQuery('select[id^="AccountEditForm.Parent Ship To Address."]:visible,input[id^="AccountEditForm.Parent Ship To Address."]:visible').on('mousedown', function(e) {
// code no longer gets here because the input fields are updated dynamically for some reason
});
注: .live()... を使用していましたが、これは jQuery の新しいバージョンではサポートされなくなりました。
V$H.