Welcome Guest, Not a member yet? Register   Sign In
[solved] Jquery + form Helper - Newbie question
#2

[eluser]Juan Velandia[/eluser]
I've made it work!:

The JS code:
Code:
$("#radio_button1").click(function(){
          $('div.hide').show();
        });  


    $("#radio_button2").click(function(){
          $('div.hide').hide();
        });

the HTML:
Code:
<?$js1 = 'id="radio_button1"'; ?>
Soy persona Natural <?php echo form_radio('tipo_persona', 'Natural', TRUE, $js1); ?>


<?$js2 = 'id="radio_button2"'; ?>
Soy persona Juridica <?php echo form_radio('tipo_persona', 'Juridica', FALSE, $js2); ?>


<div class="hide">
This shows/hides when radiobutton is clicked
</div>


Messages In This Thread
[solved] Jquery + form Helper - Newbie question - by El Forum - 04-22-2011, 06:13 AM
[solved] Jquery + form Helper - Newbie question - by El Forum - 04-22-2011, 07:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB