File: files/test.html

Recommend this page to a friend!
  Classes of Jesus Tovar   JS Show or Hide Controls   files/test.html   Download  
File: files/test.html
Role: Example script
Content type: text/plain
Description: test html
Class: JS Show or Hide Controls
Show or hide multiple element in a Web page
Author: By
Last change:
Date: 8 years ago
Size: 1,184 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML> <head> <meta http-equiv="content-type" content="text/html" /> <meta name="author" content="Tovarj4" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="functions.js"></script> <title>Show or Hidw Controls</title> </head> <body> <div> <label for="name">Name: </label> <input type="text" id="name" /> </div> <div> <label for="age">Age: </label> <input type="text" id="age" /> </div> <div> <label for="city">City: </label> <input type="text" id="city" /> </div> <div> <label for="country">Country: </label> <input type="text" id="country" /> </div> <div> <button id="show">Show Controls</button> <button id="hide">Hide Controls</button> </div> </body> <script> $(document).ready(function(){ $("#show").click(function(){ functions.showControls("name,age,city,country",true); }); $("#hide").click(function(){ functions.showControls("name,age,city,country",false); }); }); </script> </html>