jQuery select change show/hide div event

jQuery-select-change-show-hide-div-event

You are creating a form when the select element ‘parcel’ is selected it will show and hide a div.

<?php

jQuery('#player_sport_1').hide();
jQuery('#sport_name').change(function(){
 if(jQuery('#sport_name').val() == '120') {
  jQuery('#player_sport_1').show();
 } else {
  jQuery('#player_sport_1').hide();
 }
});

?>

Use following JQuery. Demo

We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.

Leave a Reply

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

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.