Reputation: 11765
Hi Is it possible to disable browser scroll bar through java script...? If yes how?
Help me if anybody knows it... Thanks in advance..
Upvotes: 10
Views: 23387
Reputation: 82
Here are other possible values for overflow
overflow = document.body.style.overflow
/* Keyword values */
overflow: "visible";
overflow: "hidden";
overflow: "clip";
overflow: "scroll";
overflow: "auto";
overflow: "hidden visible";
/* Global values */
overflow: "inherit";
overflow: "initial";
overflow: "revert";
overflow: "unset";
Upvotes: 0
Reputation: 1026
ya sure you can disable browser scroll bar just give overflow hidden for body tag using css and javascript
or just put an id for the body tag and use
eg HTML
<body id="page">
JAVASCRIPT
document.getElementById( "page" ).style.overflow= "hidden";
Upvotes: 4
Reputation: 13174
Use the following snippet;
document.body.style.overflow = "hidden";
Upvotes: 3
Reputation: 187050
CSS
body
{
overflow: hidden;
}
javascript
document.body.style.overflow = "hidden";
jQuery
$("body").css('overflow', 'hidden');
Upvotes: 31