Methods
-
trigger( eventName, params )
-
Description
Makes a proxy and calls events to the main
$elementobject, passing the current page as event data.Parameters
Name Type Description eventNamestring paramsobject 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 eventNamestring cbfunction Event callback
filterstring 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.formPageClassoption 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 pagenumber 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 pageNumbernumber Returns
Details