<link rel="stylesheet" href="./bim-loader/style.css"/>
<script type="text/javascript" src="./bim-loader/bim-loader.min.js"></script>
<script type="text/javascript">
<!--
// loading a long timed action :
$("#button").click( function(){
BimLoader.start();
$.get( "./get-a-long-timed-action" );
});
-->
</script>
<script type="text/javascript"> <!-- // loading a long timed action : $("#button").click( function(){ BimLoader.start(); $.get( "./get-a-long-timed-action" , {}, function(){ // on response; BimLoader.stop(); $("#button").html( 'Content is loaded' ); } ); }); --> </script>
<script type="text/javascript">
<!--
$(document).on( "BimLoaderReady" , function(){
// BimLoader is ready for actions :
} );
-->
</script>
Method | Description |
---|---|
BimLoader. setDefaultOptions( options ) |
options
Object
Description
Allows you to redefined the default options used in the start method.
ex :
|
BimLoader. loadTemplate( templateName , templatePath) |
templateName
The template identifier
templatePath
The template path, where to load the template
Description
Allows you to add your own templates loading a template file. This method uses asynchronous ajax, and so you'd better
load all the templates before the document is ready.
If you don't want to load a template asynchronously, you will be able to set the content of a template in string with BimLoader.setTemplateContent() ex :
|
BimLoader. setTemplateContent( templateName , templateContent ) |
templateName
The template identifier
templateContent
The template content
Description
Allows you to add your own templates without loading a distant template file.
ex :
|
BimLoader. setDefaultTemplate( templatePath ) |
templatePath
The template path
Description
Allows you to define the default template to use
ex :
|
BimLoader. setDefaultTemplateContent( templateContent ) |
templateContent
The template content
Description
Allows you to define the default template content
ex :
|
BimLoader. start( options ) |
options
List of specific options
Description
Display the loader
ex :
|
BimLoader. stop( parent ) |
parent
DOM Element : The parent loader in wich the loader is displayed
Description
Hide the loader when a response is coming
ex :
|
BimLoader. removeLoaderElements( parent ) |
parent
DOM Element : The parent loader in wich the loader is displayed
Description
Remove the loader from its parent
ex :
|
BimLoader. getLoaderElements( parent ) |
parent
DOM Element : The parent loader in wich the loader is displayed
Description
Returns the loader from its parent
ex :
|