[solved] Jquery + form Helper - Newbie question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: [solved] Jquery + form Helper - Newbie question (/showthread.php?tid=40914) |
[solved] Jquery + form Helper - Newbie question - El Forum - 04-22-2011 [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 is the javascript in <head> Code: $(document).ready(function() { And heres the radio button with the form helper format Code: <? $js1 = 'onClick="$('div.hide').hide();"'; ?> Any Ideas?. Thanks a lot, Any suggestion will be highly appreciatted. [solved] Jquery + form Helper - Newbie question - El Forum - 04-22-2011 [eluser]Juan Velandia[/eluser] I've made it work!: The JS code: Code: $("#radio_button1").click(function(){ the HTML: Code: <?$js1 = 'id="radio_button1"'; ?> |