API Docs for:
Show:

NoScrollbar Class

Defined in: loadingScreen.js:10
Module: LoadingScreen

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]
)

Defined in loadingScreen.js:10

Parameters:

  • [document_obj=document] Object optional

    The document that the stylesheet will be attached to. If not specified, the active document is the default.

Methods

addStyleElement

() private

Defined in loadingScreen.js:71

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]
)

Defined in loadingScreen.js:39

Set page style attributes to hide the browser scrollbars.

Parameters:

  • [dimension] String optional

    If 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

()

Defined in loadingScreen.js:59

Remove the class-controlled stylesheet from the document, so the scrollbars will reappear.