<div> B (gadget) </div> <script type="text/javascript" language="javascript"> //<![CDATA[ $(document).ready(function() { gadget = RenderJs.GadgetIndex.getGadgetById("B");
gadget.inc = function (){counter = counter + 1; };
gadget.htmlEvent1 = function (){counter = counter + 1;};
gadget.inc2 = function (){counter = counter + 2; };
}); //]]> </script>