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

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -