私は index.php を持っていて、ボタンをクリックして index.php に index-edit.php をロードします<div class="edit-wrapper"> </div>
。index.php にいくつかの入力があり、index-edit.php にいくつかの入力があります。フォーカスアウト時にそれらにクラスを追加したいのです.active
が、jQuery は index-edit.php のものにクラスを追加しません.active
が、残りの部分 (index-edit.php ではない) は正常に動作します。
私のscript.jsを見てください。
$( input ).focusout( function() {
$( this ).addClass('active');
});
$( document ).on( "click", ".btn", function() {
$('.edit-wrapper').load('index-edit.php');
});