Static
ClickDefines the event to listen for clicks on elements. Its value is either click
or touchstart
.
Static
DownDefines the event to listen for down events on elements. Its value is either
mousedown
or touchstart
.
Static
hasChecks if browser supports the localStorage object.
Static
isChecks if browser is running on Android.
Static
isChecks if Audio is supported.
Static
isChecks if the browser is Internet Explorer (does not include Edge).
Static
isIOSChecks if browser is running within on iPad, iPhone or iPod
Static
isChecks if browser is mobile safari by scanning the user-agent specific values.
Static
isChecks if browser is running on Windows Phone
Static
isChecks if touch is supported.
Static
MoveDefines the event to listen for moves events on elements. Its value is either
mousemove
or touchmove
.
Static
UpDefines the event to listen for up events on elements. Its value is either
mouseup
or touchend
.
Static
animateAnimates an element using css animation and calls a callback at the end. Assumes the css class contains animate definitions that will start the animation.
The method will install an event listener for 'animationend', add the classes to the element. When the event is fired, the method will remove the event listener, the css classes and call the callback if any.
The event listener will also check if the event was fired from the specified element (in case there are more animations taking place)
Element to animate
One or more css classes to add (separated by a space)
Optional
callback: UFCallbackCallback to call
Static
atChecks if an element is scrolled to the bottom.
Element to check
True if scrolled at the bottom
Static
findFinds a parent or (greater) grandparent that matches a test function.
Element to process
A function expecting one parameter and returning a boolean
The parent or null if none passed the test
Static
getReturns Android version obtained from UA string.
Version (x.x.x) or false if no version could be determined
Static
getGets the url to the background image (if any).
Based on answer: https://stackoverflow.com/a/12784180/968451
Element to get background image url for
Background image or null if no image is used
Static
getGets a css rule.
Name of rule (must match definition exactly)
Either false if no rule could be found or an object with rules.
Static
getIEVersionGets the Internet Explorer version or false if it is not an Internet Explorer browser.
false or version number.
Static
getReturns location from an event. It supports both touch and mouse events.
jQuery event object
object with position properties.
Static
getReturn value of a query parameter
Parameter name
part behind the = (till the next & or # character) or empty string if aName parameter is not found
Static
isChecks if an element is clicked upon or one of the children is clicked upon.
Element to check
Event object from click event
true
: element is clicked upon, false
: element is not clicked upon
Static
loadLoads a new image.
Url to image
Optional
successCallback: (image: HTMLImageElement) => voidCallback method when successful, will be passed the Image as parameter.
Optional
errorCallback: (image: HTMLImageElement) => voidCallback method when error occurred, will be passed the Image as parameter.
Image dom object
Static
scrollScrolls an element to the bottom.
Element to scroll
Static
transitionAdds a class to or removes a class from an element (using toggleClass), assuming this results in a transition animation.
The method will install an event listener for 'transitionend'. When the event is fired, the method will remove the event listener and call the callback if any.
The event listener will also check if the event was fired from the specified element (in case there are more transitions taking place)
Element to add class to or remove from
One or more css classes to add or remove
Optional
callback: UFCallbackCallback to call
Defines static class UFBrowser, an utilities library with static methods related to the browser environment.
UFBrowser is a singleton class instance; its methods can be accessed directly.
Mobile browser detection: http://stackoverflow.com/questions/12606245/detect-if-browser-is-running-on-an-android-or-ios-device http://stackoverflow.com/questions/3007480/determine-if-user-navigated-from-mobile-safari