I have a javascript object
function A()
{
this.ini = function()
{
$('#test').html('');
}
$('#click').on('click',function(){
alert('Hi');
});
}
But I have a problem, the event onClick is not used.
Thanks for your help
Answer
function A()
{
this.ini = function()
{
$('#test').html('');
}
$(document).on('click', '#click', function(){
alert('Hi');
});
}
No comments:
Post a Comment