Class: Slider

nyc/Slider~ Slider


new Slider(options)

Create an instance of Slider

Parameters:
Name Type Description
options module:nyc/Slider~Slider.Options

Constructor options

Source:
Fires:

Extends

Methods


append(elements)

A method to append elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Overrides:
Source:
Returns:

The container

Type
jQuery

find(selector)

A method to return elements in the container

Parameters:
Name Type Description
selector string

jQuery selector

Inherited From:
Overrides:
Source:
Returns:

The element

Type
jQuery

getContainer()

A method to return a control container HTML element wrapped in a JQuery

Inherited From:
Overrides:
Source:
Returns:

The the control container HTML element wrapped in a JQuery

Type
jQuery

off(eventName, evtHdlr [, hdlrScope])

Remove a previously connected event handler

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

on(eventName, evtHdlr [, hdlrScope])

Connect a function to an event

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

one(eventName, evtHdlr [, hdlrScope])

Connect a function to an event for a single invocation

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

prepend(elements)

A method to prepend elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Overrides:
Source:
Returns:

The container

Type
jQuery

trigger(eventName [, data])

Trigger a named event with event data

Parameters:
Name Type Argument Description
eventName string

The name of the event to trigger

data Object <optional>

The event data

Inherited From:
Overrides:
Source:

val( [value])

Get or set the input value

Parameters:
Name Type Argument Description
value number <optional>

The value of the slider input value

Source:
Returns:

Returns the slider jQuery input element or its value

Type
string | JQuery

Type Definitions


Options

Constructor options for module:nyc/Slider~Slider

Type:
  • Object
Properties:
Name Type Argument Default Description
target jQuery | Element | string

The target DOM node for creating the slider control

min number

The minimum value

max number

The maximum value

step number <optional>
1

The step value

value number <optional>

The value

units string <optional>

The units

label string <optional>

The label

Source:

Events


change

The change event

Type: module:nyc/Slider~Slider
Source: