Methods
-
trigger( eventName, params )
-
Description
Makes a proxy and calls events to the main
$element
object, passing the current page as event data.Parameters
Name Type Description eventName
string params
object Params passed to the jQuery trigger function to be attached as event data.
Details
-
on( eventName, cb, filter )
-
Description
Configures events to the plugin
Parameters
Name Type Description eventName
string cb
function Event callback
filter
string See Event Handling
Details
-
canMoveForwards() → {boolean}
-
Description
Checks if the pages can move forwards.
Returns
Details
-
canMoveBackwards() → {boolean}
-
Description
Checks if the pages can move backwards.
Returns
Details
-
getTotalPages() → {number}
-
Description
Checks the amount of the elements that matches to the
this.options.formPageClass
option value.Returns
Details
-
goTo( page ) → {number}
-
Description
Tries to move the form to a specific page. This also validates if the move is allowed (not out of bounds). In case the component can't move to the desired page, it returns the current page.
Parameters
Name Type Description page
number the page index - 1
Returns
Details
-
goToNextPage() → {number}
-
Description
Tries to move the form to the next page and returns the current page.
Returns
Details
-
goToPrevPage() → {number}
-
Description
Tries to move the form to the previous page and returns the current page.
Returns
Details
-
getParentDimensions() → {Dimensions}
-
Description
Gets the pages' parent's dimensions.
Returns
Details
-
getCurrentPageElement() → {jQuery|null}
-
Description
Gets the active page as jQuery object.
Returns
Details
-
getPageDimensions( pageNumber ) → {Dimensions}
-
Description
Gets the dimensions of the page to help adjust possible animations.
Parameters
Name Type Description pageNumber
number Returns
Details