Jquery hide() and show()

Date posted: 30/05/2019


jQuery is a JavaScript Library. It is a easiest way to use JavaScript on your website.

jQuery Event

You can write code that runs when a user clicks on a certain part or when moves mouse over a form element.

For example, this code listens when click the button.

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">


$(function () {
      $("#chkPassport").change(function () {
          if ($(this).is(":checked")) {
          } else {

<h5><b> jquery hide() and show() </b></h5>
click hear to enter id
Enter id:
</div> </body> </html>

Text box will show when when switch is on:

Thanks for usingĀ pheonix solutions.

You find this tutorial helpful? Share with your friends to keep it alive.

Leave a Reply