The Image Background class offer a way to add images in background and adding effect to it (e.g. scrolling movement), also you can use this class to do a image slide in the back.

How to Initialize the Image Background?


1: The initialization of the Image Background is an one step process, just call the function Init of the class with its two arguments (see bellow for more details).


2: Use setter functions to customize your background.


3: Then use Launch() with its 3 arguments.


Class Details


Functions:


       Initialization & Main Functions

Name

Arguments

Return

Description

Init

  • String: ID - HMTL ID defining the position in the DOM of the tab (Use body generic use).
  • String: Name - Define the name of the Background all components will be defined by this name (this is to avoid mixing if you use different Background, so be sure to use different name for each Background).

VOID

This function Initialized every part of the viewer: HMTL, CSS, Data, Events, etc...

It will be generated in the defined ID and all HTML IDs used for this PopUp will start by the RegistryName defined in arguments.


Usually Initialize by EE.

Launch

  • Integer: Time - How many time an image stay active (In MS).
  • Integer: TransitionTime - How many time it take to switch between images.
  • @Nullable @CSS String: positionType - Used to set what is the background position type.

VOID

It is used to launch the image slide of the background.

AddImage

  • String: URL - URL of this image you want to add.

VOID

Add an image to the background

AddImageMovement

VOID

Add add a movement when the page is scrolling down.



Setters Functions


Name

Arguments

Return

Description

MatchHorizontal

  • None

VOID

Change if the background image has to match (100%) horizontally.

AddBlur

  • Integer: Intensity- intensity

VOID

Setup background blur intensity (default: none).

Addbrightness

  • Integer: Intensity - intensity

VOID

Setup background brightness intensity (default: none).





Private Details



All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.


Variables (Members):


       Main Members

Name

Type

Default Value

Description

id

String

undefined

Global HMTL Id of the viewer (# + name).

name

String

undefined

Name of this PopUp.

basedId

String

undefined

Where it is located is the existing DOM (its parent).

Images

String[]

[]

Store all images URL.

activeImage

Integer

0

ID of the active image.

nextImage

Integer

1

ID of the next image.

matchHorizontal

Boolean

false

Hold the information about the need to make sure image are a 100% horizontally

blurIntensity

Float

0

Hold blur intensity

brightness

Float

0

Hold brightness intensity



Functions:        

Updates functions

Name

Arguments

Return

Description

UpdateTitle

  • None

None

Reset text centering of the title.

UpdateSelects

  • None

None

Reset text centering of the options.

UpdateStyle

  • None

None

Set all design of the popup



Util Functions

Name

Arguments

Return

Description

GetBG

  • None

JQuery DOM Object

Get the background image div.

GetFG

  • None

JQuery DOM Object

Get the foreground image div.




Compatibility



LANGUAGE CLASS:  Not compatible.

Created with the Personal Edition of HelpNDoc: Full-featured EBook editor