JQUERY 1.9 ,1.10, 1.11 conflict with code >> วิธีแก้ตอนสร้าง element เพิ่มมาที่หลัง
Support for
.live()
has been deprecated since version 1.7 and removed since version 1.9. You should switch to the dynamic form of .on()
which would change from this:$('#go_btn').live('click', function () {
to this:
$(document).on('click', '#go_btn', function () {
Ideally, instead of
$(document)
, you would pick a closer parent of #go_btn
that is static (e.g. not dynamically created) as this is more efficient than using $(document)
, particularly if you have a number of delegated event handlers like this.
Some references for delegated event handling with
.on()
:credit: http://stackoverflow.com/questions/21813266/jquery-1-9-1-10-1-11-conflict-with-code