Commit bf10906b authored by Sven Franck's avatar Sven Franck

jqm_4 examples updated

parent 7325bdca
......@@ -7,14 +7,15 @@
<body>
<p>HELLO recursive</p>
<input type="button" value="click me" id="clickediclick" icon="gear" iconpos="left" data-inline="true"/>
<!-- cannot trigger g1 with a regular document binding, because going and forth re-binds into too much recursion-->
<button type="button" onclick="RenderJs.GadgetIndex.getGadgetById('g1').gadget_call1()" value="click me" id="clickediclick" icon="gear" iconpos="left" data-inline="true"/>
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.GadgetIndex.getGadgetById("g2");
var g2 = RenderJs.GadgetIndex.getGadgetById("g2");
console.log("attaching gadget_call2");
gadget.gadget_call2 = function (){gadget_call2();};
g2.gadget_call2 = function (){gadget_call2();};
});
//]]>
</script>
......
......@@ -96,9 +96,9 @@
//<![CDATA[
$(document).ready(function() {
console.log("attaching gadget_call1 and 3");
gadget1 = RenderJs.GadgetIndex.getGadgetById("g1");
gadget1.gadget_call3 = function (e){gadget_call3("test parameter")};
gadget1.gadget_call1 = function (e){gadget_call1()};
var g1 = RenderJs.GadgetIndex.getGadgetById("g1");
g1.gadget_call3 = function (e){gadget_call3("test parameter")};
g1.gadget_call1 = function (e){gadget_call1()};
});
//]]>
</script>
......
......@@ -4,9 +4,11 @@ var gadget_call1 = function() {
var gadget_call3 = function(p) {
console.log("gadget_call3 registered, parem = "+p);
}
// trigger does not work!
// trigger
/*
$(document).on('click','#clickediclick',function() {
console.log("click trigger");
var g = RenderJs.GadgetIndex.getGadgetById('g1')
g.gadget_call1();
});
*/
\ 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