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

[eluser]Juan Velandia[/eluser]
Hello Everyone, I'm starting with Jquery and I'm trying to hide a div when a user checks a radio button, and as this is my first jquery code within Codeigniter I'm having some issues:

this is in the view
Code:
<div class="div_to_hide">
This must be hidden!
  </div>


this is the javascript in &lt;head&gt;
Code:
$(document).ready(function() {
    $("#person").click(function(){
          $('div.div_to_hide').hide();
         alert("HELLO this works!");
        });

And heres the radio button with the form helper format
Code:
&lt;? $js1 = 'onClick="$('div.hide').hide();"'; ?&gt;
Persona:&lt;?php echo form_radio('#person', 'Natural', TRUE, $js1 ); ?&gt;

Any Ideas?. Thanks a lot, Any suggestion will be highly appreciatted.


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