Welcome Guest, Not a member yet? Register   Sign In
hide/show element using jQuery
#1

[eluser]fcodebue[/eluser]
Into my view I need to hide/show elements using jQuery if some one choose one value of a radio button.

I load coorectly into my view header my jQuery library 1.5.1 and I wrote something like this

function imposta_rspp() {
if $('#rspp_interno_esterno'). == 'I' ) {
jQuery('#rspp_nome').show()();
jQuery('#rspp_formazione').show()();
jQuery('#rspp_data_ultima_formazione').show();
else {
jQuery('#rspp_nome').hide();
jQuery('#rspp_formazione').hide();
jQuery('#rspp_data_ultima_formazione').hide();
}
}

naturally I create my radio button with this facility


$rspp_i= array(
'name' => 'rspp_interno_esterno',
'id' => 'rspp_interno_esterno',
'value' => 'I',
'checked' => $checked,
'onclick' => 'imposta_rspp()'
);
$rspp_e= array(
'name' => 'rspp_interno_esterno',
'id' => 'rspp_interno_esterno',
'value' => 'E',
'checked' => !$checked,
'onclick' => 'imposta_rspp()'
);
echo 'interno'.form_radio($rspp_i).'esterno'.form_radio($rspp_e);


someidea why doesn't work


Messages In This Thread
hide/show element using jQuery - by El Forum - 03-14-2011, 05:14 AM
hide/show element using jQuery - by El Forum - 03-15-2011, 05:15 PM
hide/show element using jQuery - by El Forum - 03-15-2011, 07:37 PM
hide/show element using jQuery - by El Forum - 03-16-2011, 04:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB