| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Author: Stephen Hoogendijk - TheCodeAssassin
This project is licensed under the GPLV2 license.
This plugin uses the jQuery loadmask plugin by Sergiy Kovalchuk.
================================================
Simple boostrap plugin to allow tabs and accordions to fetch their data from a remote source
The script is only 2.5k compressed!
You can use the following properties to enable remote data tabs:
| Property | Value | Effect | Required |
|---|---|---|---|
| data-tab-url | url | The remote data url | True |
| data-tab-always-refresh | true | Always refresh this tab | False |
| data-tab-callback | function-name | Callback to be fired upon show (will be executed after the data is loaded). It takes the following arguments: html, trigger, container, (optional) json data that was sent | False |
| data-tab-json | json | JSON data to be send when fetching the URL | False |
| data-tab-delay | number | Simulate a delay (in miliseconds) | False |
Check the demo for details on how to use this plugin.
Note: The properties are still named data-tab due to backwards compatibility
You can change the default settings of this plugin by providing the settings as a global variable.
There are two options currently:
var bootstrapRemoteTabSettings = {
customLoadFn: function(isLoading) {
var loader = $('.custom-loader');
if (isLoading) {
loader.show();
} else {
loader.hide();
}
},
loadFirstTab: true
}
This plugin hooks into the bootstrap tab/accordion 'show' event. In order to use a custom event callback, you can provide data-tab-callback to let the plugin execute your custom callback. If you want a callback to be fired after the show event, use the native shown event.
| Back | FazBrowse Home | New Git URL |