Remove vertical scrollbar on fullscreen?
<p>I'm sorry for this stupid question but I really can't get it work...
I want to remove vertical scrollbar after switch to fullscreen.</p>

<p>This is the script I'm using at the moment:</p>

<pre><code>&lt;script type="text/javascript"&gt;
if((window.fullScreen) || (window.innerWidth == screen.width &amp;&amp; window.innerHeight == screen.height)) {
    $("html").css("overflow", "hidden");
} else {
    $("html").css("overflow", "auto");
}
&lt;/script&gt;
</code></pre>

<p>I've tried like this without any success:</p>

<pre><code>&lt;script type="text/javascript"&gt;
if(window.fullScreen) {
    $("html").css("overflow", "hidden");
} else {
    $("html").css("overflow", "auto");
}
&lt;/script&gt;
</code></pre>

<p>Tank you as always.</p>

<p>EDIT:
<code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;</code> is being loaded and other jquery script's are working ok.</p>

<p>EDIT:
I've tested with:</p>

<pre><code>$(document).ready(function() {
$("body").css("overflow", "hidden");
});
</code></pre>

<p>And it works!
So I believe that for some reason the javascript condition code it's not working!
<code>if((window.fullScreen) || (window.innerWidth == screen.width &amp;&amp; window.innerHeight == screen.height))</code>...</p>

<p>EDIT:</p>

<p>Solution found!</p>

<pre><code>&lt;script type="text/javascript"&gt;
var control = 0;

function scrollbar(){
    if(event.keyCode == 122 &amp;&amp; control == 0){
        //remove scrollbar
        $("body").css("overflow", "hidden");
        control = 1;
    }
    else{
        //add scrollbar
        $("body").css("overflow", "auto");
        control = 0;
    }
}

&lt;/script&gt;
</code></pre>

<p>If you want to use this don't forget to attach the function to the body for example like:</p>

<pre><code>&lt;body onkeydown="scrollbar();"&gt;
</code></pre>

<p>UPDATE:</p>

<p>Work's in chrome, opera, ie, safari except for firefox! What can be done to fix firefox?</p>
