最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Need whole body tag mouseover function - Stack Overflow

programmeradmin6浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 4

The 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/.

发布评论

评论列表(0)

  1. 暂无评论