以前に登録したjQueryオブジェクトをjQueryの.on()
メソッドセレクターとして使用する方法はありますか?
というのは:
//The code below doesn't work as expected.
$containerElement= $('#containerElement');
$myButton = $('#mybutton')
$containerElement.on('click', $myButton , function(){ //<-- how can I use my previously registered $myButton element here?
alert('yeyy!');
})
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加