The Official Blog of Patcoola

Im just a dude watching over my parents,
and trying to make cartoons and video games from home.

Script: Blinds [JS Class]

Important!

Dear visitors,

This blog and the Tigarus.com network will be changing our website software in May (2024). There will be some down time and there will be a change to the webpage addresses.

We will also be removing the Anime blogs. The Rocksmith Songs website will be unavailable of a few weeks or months while I move the database to the new software.

At the moment we are running on Wordpress, the new software is an in-house project which is 57 times faster. It will also provide more freedom for development.

Thank you for understanding.

, By Patcoola

Script Title: blinds
Programming Language: Java Script
Date Completed: 2012/11/27

Purpose: To easily set or create a blinds, also known as lights out overlay for a Web page.

Advertisement

Donate Now!

After a hard day, I like to relax with a cold jar of pickle juice and a hardy fart. If you like my blog, please consider donating.


Description: Blinds is an overlay effect and content layer to shade out and block access to the normal Web page content. Blinds, also known as lights, shade out or dimmer switch, is used for features such as custom error message boxes, light boxes and picture viewers. Blinds is an easy to use Java Script Class for creating and customizing the layer and adding a transition effect.

Blinds provides more features than conventional dimmer switches, such as transition effect, option to open blinds when clicked, blind are not user selectable and block the right click’s context menu. Hides and displays HTML Elements that cannot be over lapped.

Compatibility: Works with all modern Web browsers, some legacy support.
Note: Does not check for HTML5 Objects.

Methods:

var class = new blinds();

class.id;Set the element ID, else returns default blinds(random numbers)
class.protectNodeSet the element, to not have objects blacked out
class.opacity;Set the opacity, default 80
class.color;Set the color, default black
class.depth;Set the z-index, default 999
class.animateClose;Set time in milliseconds for fade FX, default 0
class.animateOpen;Set time in milliseconds for fade FX, default 0
class.openOnClick;Set true or false, opens the blinds if clicked, default true
class.isClose;Returns true or false if the blinds is close
class.isActive;Returns true or false if blinds is in animation

class.create();Function to create the blinds
class.open();Function to remove the blinds effect
class.close();Function to add the blinds effect

Protect Node:

Protect Node, set the element for all iFrames and Object HTML Elements to not be temporary blacked out. Use this for Floating content above the blinds, when the content contains an iFrame or Object element such as Flash.

Example:

class.protectNode = document.getElementById( “litebox” );

The element ID is targeted for protection

Example:

class.protectNode = “litebox”;

The element ID is targeted for protection

Example:

class.protectNode = 0;

Target element index 0

 

Advertisement

Donate Now!

After a hard day, I like to relax with a cold jar of pickle juice and a hardy fart. If you like my blog, please consider donating.


 

Post Meta

Share Post

 

Comments: Write Comment

Be the first to write a comment.


Leave a Comment


All comments are reviewed before publishing. Comments must be related to the page topic, must not be spam, and must comply with the criminal code of Canada.