Jump to content

vivekam8

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by vivekam8

  1. I am very new to jquery and ajax. While googling (i wonder if "googling" is a dictionary word!!) for some code which enables to toggle between two divs using radio buttons, I stumbled upon this code. It is not working but I feel it is very close to being correct!! Can someone help me to correct this? Thanks in advance Your fan! <html> <head> <script type="text/javascript"> $(function() { $("[name=toggler]").click(function(){ $('.toHide').hide(); $("#blk-"+$(this).val()).show('slow'); }); }); </script> </head> <body> <label><input id="rdb1" type="radio" name="toggler" value="1" />Money</label> <label><input id="rdb2" type="radio" name="toggler" value="2" />Interest</label> <div id="blk-1" class="toHide" style="display:none"> money </div> <div id="blk-2" class="toHide" style="display:none"> interest </div> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.