javascript - Show hidden div on change of a select field -


i have select field id #dailywardentry-ipd_patient_id , div id , class <div id ="div2" class="hidden">

i using css keep div hidden on load .hidden { display: none; } using function show div on change of select field above. div hidden on load, should show on change.

<script type="text/javascript">     $(function(){     $("#dailywardentry-ipd_patient_id").on("change", function(){         $("#div2").removeclass('hidden');;     }); }); </script> 

what doing wrong here? thanks

ok think there conflict in jquery library working in yii2 framework, loads own jquery.

i done using code:

<?php $this->registerjs("$('#dailywardentry-ipd_patient_id').on('change', function(){         $('#div2').removeclass('hidden');      });");  ?> 

Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -