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

Learn Tutorials Point
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.
Comments
  • Thank you for sharing your thoughts. I really appreciate your efforts and I am waiting for your further write
    ups thanks once again.

  • Wow, wonderful weblog format! How lengthy have you been blogging for?
    you made blogging look easy. The entire glance of your web site is excellent,
    let alone the content material!

  • Pingback: VecBeast

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.