Browser JavaScript utilities.
Kind: global variable
- PrhoneUtils :
Object
- .isMobile :
Boolean
- .isOld :
Boolean
- .isIE :
Number
- .isIOS :
Boolean
- .getDims(wMin, hMin, wMax, hMax) ⇒
Object
- .getHeight([win]) ⇒
Number
- .getFrameHeight(frame) ⇒
Number
- .fitIframeHeight(iframe, [conf]) ⇒
Number
- .getScrollOffset() ⇒
Object
- .scrollTo(conf) ⇒
jQuery
- .isMobile :
If the window is mobile.
Kind: static property of PrhoneUtils
Browser is old.
Kind: static property of PrhoneUtils
If the browser is IE and the value is the version. Otherwise, it is false.
Kind: static property of PrhoneUtils
If the browser is iOS.
Kind: static property of PrhoneUtils
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. |
Get a window content height.
Kind: static method of PrhoneUtils
Param | Type | Description |
---|---|---|
[win] | Window |
Window object. |
Get window frame content height.
Kind: static method of PrhoneUtils
Param | Type | Description |
---|---|---|
frame | Node |
Window frame object. |
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. |
Get the position of the document respecting the scroll.
Kind: static method of PrhoneUtils
Returns: Object
- - { Number x, Number y }
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 |