I need to whole body mouseover function. When I enter some other page, some of my content will append the particular div.
My code is:
$('body').mouseover(function() {
$('#text').append('<div>New content</div>');
});
I need to whole body mouseover function. When I enter some other page, some of my content will append the particular div.
My code is:
$('body').mouseover(function() {
$('#text').append('<div>New content</div>');
});
Share
Improve this question
edited Jul 21, 2011 at 9:13
pimvdb
155k80 gold badges311 silver badges356 bronze badges
asked Jul 21, 2011 at 9:11
user844589user844589
1
- 2 This works for me, what's the problem? – marto Commented Jul 21, 2011 at 9:18
1 Answer
Reset to default 4The body will not always have its full potential height if the contents fit in a lower height.
You could use $('html').mouseover
instead: http://jsfiddle/mPdd7/.