KUMobile

API Docs for: 0.0.2

KUMobile

Module: KUMobile

Contains all generic functions, events, and feature classes.

addNewIndicator

(
  • selector
)

Adds a 'new' indicator for every selected element

Parameters:

Name Type Description
selector String
  • query string to add indicators to

Example:

KUMobile.addNewIndicator("#list li.special");

convertStateToFull

(
  • abr
)
String

Converts a state name from abbreviation to full state name. If the conversion does not work it will simply return the abbreviation to be safe!

Parameters:

Name Type Description
abr String
  • state abbreviation to convert to full state

Example:

var state = KUMobile.convertStateToFull("MI");

hideLoading

(
  • id
)
Void

Hides the loading indicator on the page with the given id

Parameters:

Name Type Description
id String
  • identifier for which page to show indicator on

Example:

KUMobile.hideLoading("news-page");

safeBinder

(
  • event
  • query
  • callback
)

Binds a jquery event safely by first removing any prexisting event! This prevents it from being binded twice.

Parameters:

Name Type Description
event String
  • jquery mobile event name
query String
  • jquery query for element to bind
callback Function
  • function to be called on event trigger

Example:

KUMobile.safeBinder("pageinit", "#mydiv", myfunction);

scrollTo

(
  • containerQuery
  • elementQuery
)

Scrolls an overflow container to a certain element

Parameters:

Name Type Description
containerQuery String
  • container query string
elementQuery String
  • element query string

Example:

KUMobile.scrollTo("#container", "#mydiv");

showLoading

(
  • id
)
Void

Displays the loading indicator on the page with the given id

Parameters:

Name Type Description
id String
  • identifier for which page to show indicator on

Example:

KUMobile.showLoading("news-page");

version

String

Contains the version information loaded from the app manifest! Note: this is only available after the device ready function is called, until then it is null

Default: null

pageChange

Triggered any time a page is changed as registered by jQuery Mobile. The primary purpose is to allow us to resize to be safe that all elements are scaled properly.

ready

Event triggered after the home page initialization!

ready

Event triggered when the device is ready, registered with "deviceready". The primary purpose is to determine what type of device we are on (Android, iOS, Windows). Note: this is only triggered if you are ON a device!

throttledResize

Resize function to link to jQM event for throttled resize. The purpose is that this resize function is controlled to not occur too quickly and advanced resizing can be done here. Alternative to this is just to use css calc(), but not fully supported across all target devices as of time of development (2/26/2015).