198
rated 0 times
[
199]
[
1]
/ answers: 1 / hits: 54750
/ 13 Years ago, mon, july 11, 2011, 12:00:00
I would like to write a function using jQuery to append a div
to the end of a web page. I would like to be able to use the function on many different pages.
I've written the following code, but it doesn't work:
$(document).append('<div id=helloDiv></div>');
$('#helloDiv').html('hello'); // does nothing
$('#helloDiv').css('top','100') // throws an error
How do I fix this?
More From » jquery