NoScrollbar Class
A class for hiding the scrollbars in a browser window by writing style sheet rules.
Typical Usage
// initialize class to operate on the active document
var no_scrollbar = new NoScrollbar();
// hide both horizontal and vertical scrollbars
no_scrollbar.disableScrollbars();
// make the scrollbars reappear
no_scrollbar.reenableScrollbars();
Constructor
NoScrollbar
-
[document_obj=document]
Parameters:
-
[document_obj=document]
Object optionalThe document that the stylesheet will be attached to. If not specified, the active document is the default.
Item Index
Methods
addStyleElement
()
private
Checks for existence of a style element in the associated document with an id equal to this.style_id. If it does not exist, it is created. In all cases the style element is returned.
disableScrollbars
-
[dimension]
Set page style attributes to hide the browser scrollbars.
Parameters:
-
[dimension]
String optionalIf a string of "x" is passed then only the horizontal scrollbars will be hidden, or if "y" is passed only the vertical scrollbars are hidden. The default is for both horizontal and vertical scrollbars to be hidden.
reenableScrollbars
()
Remove the class-controlled stylesheet from the document, so the scrollbars will reappear.