Methods

Methods are called on the jmpress object like such:

$(selector).jmpress( 'methodName', param1, param2, paramN );

Navigational

select( selector )

Move to the first step matching the given selector.

goTo( selector )

Same as select( selector )

next()

Select the next step in flow

prev()

Select the previous step in flow

home()

Select the first step in DOM

end()

Select the last step in DOM

Setup & Tear Down

init()

Initializes jmpress with the default config (like impress.js).

init( config )

Initializes jmpress with a custom config object.

deinit()

Deinits jmpress, returning to it's original state. If already deinited it does nothing. This is useful for enabling a print mode.

settings()

Returns the settings object which you can modify.

Template

template( templateName, templateData )

Adds or modify a template. If it's already defined then the old template is extended with the new properties.

apply( selector, templateName )

Applies the template to all selected steps.

apply( selector, templateData )

Applies the template directly by template data object.

apply( selector, arrayOfTemplateDatas )

Applies template data to an array of selected items.

Miscellaneous

active()

Returns the active step as jQuery object.

fire( callbackName, element, eventData )

fire a event

canvas()

returns the canvas element as jQuery object

canvas( css )

sets styles on the canvas element and returns it

css( element, cssAsObject )

Applies css with the correct browser prefix.

reapply( step )

reapplies styles on step, should be called after modifying stepData

defaults()

Return or modify the default settings used in jmpress.js.

register( name, callback )

Register a new callback.

dataset( element )

Returns the dataset of an element.