Zaman Damgasi: 1571757041

Documentation

jNavigate aims to provide enough options to fit most implementations. If you do not find what you need within this page please use the Example form to make a suggestion and I will do my best to respond to all requests.

Usage

To enable a content section to be loaded dynamically is as simple as the line of code below.

$("#mycontentdiv").jNavigate();

By default this will load the content from any anchor tag or form submit/button outside of the container with the class of .trigger and any input[type=submit] inside the container where the container is #mycontentdiv shown in the above example. For more options to customise the behaviour please see below.

Options

  • intTrigger - default: "input[type=submit]" - accepts: String

    A selector for elements inside the container that when clicked will trigger the container content to be loaded from either the href or parent form action.

  • extTrigger - default: ".trigger" - accepts: String

    A selector for elements outside the container that when clicked will trigger the container content to be loaded from either the href or parent form action.

  • switchContent - default: true - accepts: Boolean

    Flags whether the containers content should be switched out with the response text. This would be set to false in some instances if overriding the default action in a callback.

  • showLoader - default: true - accepts: Boolean

    Flags whether the container should be overlayed with a loading indicator when switching container content.

  • loadingColor - default: #FFFFFF - accepts: String

    Background color of the loading indicator. Supports any CSS color formatting.

  • spinner - default: "images/ajax-loader.gif" - accepts: String

    Loading image used as the overlays background.

  • useHistory - default: true - accepts: Boolean

    Flags whether to use history for application state. If true this will only be available to people using web browsers that support the HTML5 history API .

  • loaded - default: null - accepts: function

    Callback that is fired once the content has been successfully loaded.

  • error - default: function - accepts: function

    Function to run if an error occurs during the request. By default the original click event action is carried out.

© 2016 Company, Inc.