show/hide divs by select.(jquery, wordpress )

Why doesn’t this work? I’m not sure what I’m doing wrong. I’m certain that jquery is working on the page (wordpress).

    <script type="text/javascript">
jQuery("#rejestracja-1").bind('change', function(event) {
           var info= jQuery("#abc-24").val();
            if(info=="czynny")
             {
             jQuery(".udzialfull").show();
             }
           elseif(info=="bierny")
             {
               jQuery(".udzialfull").hide();
              }
});
</script>




<form id="rejestracja-1"  method="post" enctype="multipart/form-data">

Rodzaj udziału 
<select id="abc-24">
<option value="czynny" selected='selected'>czynny</option>
<option value="bierny">bierny</option>
</select>

<fieldset class="udzialfull">
szczegoly
</fieldset>

Read more here: show/hide divs by select.(jquery, wordpress )

Leave a Reply

Your email address will not be published. Required fields are marked *