Use .on() (for new jquery versions – >= 1.7):
1 2 3 4 5 6 |
$(document).on('click', '#btnALERT1', function() { alert("Hello"); }); |
or: –
1 2 3 4 5 6 |
$('#btnALERT1').live('click', function() { alert("Hello"); }); |
Or:
1 2 3 4 5 6 |
$(document).delegate('#btnALERT1', 'click', function() { alert("Hello"); }); |