Documentation
load
usage
.kaiten("load", function, [{data}], [$src])
paramètres
function : Function, the function that will be used to retrieve the HTML content
data : Object (optional), the data that will be passed to the function
$src : jQuery object, the element that initiated the loading (optional)
retourne
A jQuery object, the panel created
Use the load function to create a new panel and to display HTML content.
The function passed as first argument can return an HTML string or the AJAX object used for retrieving the HTML content.
If provided, the $src element will be highlighted.
exemples
Assuming that we are in Kaiten's startup function :
// example #1
this.kaiten('load', function(data, $panel, $kaiten) { return $.get('home.html'); });
// example #2
this.kaiten('load', function(data, $panel, $kaiten) { return '<h1>Home</h1>' });
Voir aussi :
reload
Reload a panel content.