How to get the body element using jquery

Try this…

$('body,html').css('overflow','hidden');

the ,html allows you to also include the <html> because some browsers may use that as the base as oppose to the <body> tag so it helps treating both as if they were one.

helpful
any tag should be selected like so $('a'); or $('body');

an element can be selected by id using the prefix # so

<a id="c_1" >CLick Me</a>

$('#c_1');

or by class with the prefix .

<a class="classname">Click Me</a>

$('.classname');

for more information read http://api.jquery.com/category/selectors/
as for the scroll bars they are controlled by css, you could simply go on a css file and do the following.

body, html {overflow: hidden;}

the overflow parameter allows you to control what happens when content overflow the assigned width and hight.

http://reference.sitepoint.com/css/overflow

or the proper reference http://www.w3.org/TR/CSS2/visufx.html

sorry if this is too technical, but one day you would have to learn about these 🙂

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)