Skip to content

Latest commit

 

History

History
121 lines (87 loc) · 4.54 KB

API.md

File metadata and controls

121 lines (87 loc) · 4.54 KB

PrhoneUtils : Object

Browser JavaScript utilities.

Kind: global variable

PrhoneUtils.isMobile : Boolean

If the window is mobile.

Kind: static property of PrhoneUtils

PrhoneUtils.isOld : Boolean

Browser is old.

Kind: static property of PrhoneUtils

PrhoneUtils.isIE : Number

If the browser is IE and the value is the version. Otherwise, it is false.

Kind: static property of PrhoneUtils

PrhoneUtils.isIOS : Boolean

If the browser is iOS.

Kind: static property of PrhoneUtils

PrhoneUtils.getDims(wMin, hMin, wMax, hMax) ⇒ Object

Get the usable browser window dimentions.

Kind: static method of PrhoneUtils
Returns: Object - { Number width, Number height }

Param Type Description
wMin Number Minimum width.
hMin Number Minimum height.
wMax Number Maximum width.
hMax Number Maximum height.

PrhoneUtils.getHeight([win]) ⇒ Number

Get a window content height.

Kind: static method of PrhoneUtils

Param Type Description
[win] Window Window object.

PrhoneUtils.getFrameHeight(frame) ⇒ Number

Get window frame content height.

Kind: static method of PrhoneUtils

Param Type Description
frame Node Window frame object.

PrhoneUtils.fitIframeHeight(iframe, [conf]) ⇒ Number

Changes <iframe> DOM node height to fit the content propertly. A default minimum height can be set.

Kind: static method of PrhoneUtils
Returns: Number - - Final height set in pixels.

Param Type Description
iframe String Iframe node element.
[conf] Object Changes settings.
[conf.level] String Where does the iframe resides? 'parent', 'top' or by default, the same window.
[conf.min] Number Minimum height to set. Default 300 pixels.
[conf.plus] Number Pixels to add/substract to the final height.

PrhoneUtils.getScrollOffset() ⇒ Object

Get the position of the document respecting the scroll.

Kind: static method of PrhoneUtils
Returns: Object - - { Number x, Number y }

PrhoneUtils.scrollTo(conf) ⇒ jQuery

Animate the scroll to where an element is located.

Kind: static method of PrhoneUtils

Param Type Description
conf Object | jQuery
conf.$el jQuery
[conf.$ct] jQuery If the element is inside a positionated container element, this should be provided.
[conf.time] Number
[conf.type] String The type of animation to scroll to the element. If can be 'center' (by default) or 'top'.
[conf.topOffset] Number
[conf.callback] function