Commit 27df6f8c authored by Sebastien Robin's avatar Sebastien Robin

show how we can directly define gadget to define directly in index.html

parent 06cbf15b
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
<div class="wrapper"><!-- not needed? up to you: http://camendesign.com/code/developpeurs_sans_frontieres --> <div class="wrapper"><!-- not needed? up to you: http://camendesign.com/code/developpeurs_sans_frontieres -->
<!-- here we show example of gadget definition directly defined in html-->
<header> <header>
<div id="gadget-header"/> <div id="gadget-header" gadget="gadget/cached_navigation.html"/>
</header> </header>
<article> <article>
<!-- here we will show example of adding gadget through javascript code-->
<div id="gadget-article"> <div id="gadget-article">
</article> </article>
</div> </div>
......
/* trigger when page is ready */ /* trigger when page is ready */
$(document).ready(function (){ $(document).ready(function (){
RenderJs.TabbularGadget.addNewTabGadget('gadget-header', 'gadget/cached_navigation.html'); // Only bootstrap a div wich define a gadget
RenderJs.bootstrap($("#gadget-header"));
// Here we add gadget to an existing div with javascript code
RenderJs.TabbularGadget.addNewTabGadget('gadget-article', 'gadget/article.html'); RenderJs.TabbularGadget.addNewTabGadget('gadget-article', 'gadget/article.html');
}); });
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment