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.
To enable a content section to be loaded dynamically is as simple as the line of code below.
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
#mycontentdiv shown in the above example. For more options to
customise the behaviour please see below.
intTrigger - default:
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:
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:
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:
Flags whether the container should be overlayed with a loading indicator when switching container content.
loadingColor - default:
Background color of the loading indicator. Supports any CSS color formatting.
spinner - default:
Loading image used as the overlays background.
useHistory - default:
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:
Callback that is fired once the content has been successfully loaded.
error - default:
Function to run if an error occurs during the request. By default the original click event action is carried out.