I'm just trying to add some string or HTML tag inside div #OL_Icon_63 using jQuery .append(), here's the example of code :
$(document).ready(function() {
$('#OL_Icon_63').append('HELLO WORLD');
});
But that's code won't work for me, I try to change the code like this :
$(document).ready(function() {
$("body").click(function() {
$('#OL_Icon_63').append('HELLO WORLD');
});
});
And
$(document).ready(function() {
$("body").hover(function() {
$('#OL_Icon_63').append('HELLO WORLD');
});
});
Two kinds of code work for me where I use .hover() and .click() after body tag, but i basically can not use the function like .append() or anything else without adding .hover() or .click() after $("body")
but when I use click or hover the string appeared repeatedly
Can anyone give me some example / opinion so that .append() jQuery function will work perfect for me?