None
This class features a number of useful utility methods for use around your site
| Option name | Type | Description |
|---|---|---|
| options | object | Object containing required settings. The only required option is 'url' |
Load a URL
Note: If loading binary data, a handy reference: http://www.html5rocks.com/en/tutorials/file/xhr2/
| Option name | Type | Description |
|---|---|---|
| element | domelement | The DOM element to apply the new styles to |
| styles | object | An object of key-value pairs stating each new style's name and it's new value |
Set one or more styles on an element
| Option name | Type | Description |
|---|---|---|
| cookieName | string | The name of the cookie to find a value for |
Get a cookie value by name
| Option name | Type | Description |
|---|---|---|
| cookieName | string | The name of the new cookie |
| cookieValue | string | The value the new cookie should contain |
| days | string | Optional cookie duration, in days. If left blank, the cookie will act as a session cookie |
Set a new cookie for the current domain
Get the main element that can scroll the whole page
| Option name | Type | Description |
|---|---|---|
| eventName | string | The name of the event to check exists |
| element | domelement_or_string | The element that may contain the event. If set as a string, eg. "span", the element matching the string will be created. Leave out to just test a standard div |
Check if an element supports a particular event
Via Modernizer and http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
| Option name | Type | Description |
|---|---|---|
| formElement | domelement | The form element containing fields to serialise |
Serialise form data
| Option name | Type | Description |
|---|---|---|
| selector | domelement_or_string_or_jQueryobject | A selector string, DOM element, or jQuery object from which to return a matching DOM element |
Get actual DOM element from a selector
| Option name | Type | Description |
|---|---|---|
| propertyName | string | The name of the style that may require a prefix before it works |
Return a version of the passed property name that is supported by the current browser
This will either be the one passed in, or a prefixed version of it
| Option name | Type | Description |
|---|---|---|
| value | string | The string to camelcase |
| jsProperty | boolean | True if value should be treated as a code property (remove dashes and uppercase the letter that follows one) |
| upperFirstChat | boolean | True if the first character should always be uppercase (overrides jsProperty, when true, so that the first character is uppercase) |
Convert a passed string to camelcase format