Namespace: ML

ML

Main namespace.

Classes

Ajax
Animate
Carousel
Modal
Tooltip

Namespaces

Breakpoints
Dropdown
El

Methods


<static> bool(str)

Pass in a string and it will be returned as a boolean. If the string is not true or false, the string passed will be returned.

Parameters:
Name Type Description
str String

The string to convert into a boolean.

Returns:
Type
Boolean

<static> extend(defaults, options)

Merge defaults with user options.

Parameters:
Name Type Description
defaults Object

Default settings.

options Object

User options.

Returns:

Merged values of defaults and options.

Type
Object

<static> isBool(val)

Returns true or false if value is a boolean.

Parameters:
Name Type Description
val *

Test value.

Returns:
Type
Boolean

<static> isNum(val)

Returns true or false if value is a number.

Parameters:
Name Type Description
val *

Test value.

Returns:
Type
Boolean

<static> isString(val)

Returns true or false if value is a string.

Parameters:
Name Type Description
val *

Test value.

Returns:
Type
Boolean

<static> isUndef(val [, empty])

Returns true or false if a value is undefined.

Parameters:
Name Type Argument Default Description
val *

Test value.

empty Boolean <optional>
false

Checks if the value is empty, i.e. "". If a value is empty and parameter is not set, false is returned.

Returns:
Type
Boolean

<static> nodeArr(nodeList)

Returns nodes as an array.

Parameters:
Name Type Description
nodeList Nodes

Nodes from a list of nodes.

Returns:
Type
Array

<static> parObj(str, base, sep)

Parses a string into an object.

Parameters:
Name Type Description
str String

String to be parse.

base String

Base of the string to be removed.

sep String

Used to separate each property.

Returns:
Type
Object

<static> urlParams(arg)

Returns query paramaters.

Parameters:
Name Type Description
arg String | Object

Query parameter.

Returns:
Type
String
Example
var str = 'animal=cat&fruit=apple'; // 'animal=cat&fruit=apple' is returned.
var obj = {animal: 'cat', fruit: 'apple'}; // 'animal=cat&fruit=apple' is returned.

<static> windowDimen()

Returns the width and height of the window.

Returns:
Type
Object