1 / 3

Manipulating Focus on input boxes

Manipulating Focus on input boxes. <!DOCTYPE html> <html> <head> <script src ="D:/C2y/jquery-1.9.1.min.js"> </script> <script> $(document).ready(function(){ $("input").focus(function(){ $(this). css ("background-color","# cccccc "); }); $("input").blur(function(){

kamana
Download Presentation

Manipulating Focus on input boxes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Manipulating Focus on input boxes

  2. <!DOCTYPE html> <html> <head> <script src="D:/C2y/jquery-1.9.1.min.js"> </script> <script> $(document).ready(function(){ $("input").focus(function(){ $(this).css("background-color","#cccccc"); }); $("input").blur(function(){ $(this).css("background-color","#ffffff"); }); }); </script> </head> <body> Name: <input type="text" name="fullname"><br> Email: <input type="text" name="email"> </body> </html>

  3. Slide toogle • <!DOCTYPE html> • <html> • <head> • <script src="D:/C2y/jquery-1.9.1.min.js"> • </script> • <script> • $(document).ready(function(){ • $("#flip").click(function(){ • $("#panel").slideToggle("slow"); • }); • }); • </script> • <style type="text/css"> • #panel,#flip • { • padding:5px; • text-align:center; • background-color:#FF6600; • border:solid 1px #c3c3c3; • } • #panel • { • padding:50px; • display:none; • } • </style> • </head> • <body> • <div id="flip">Click to slide the panel down or up</div> • <div id="panel">Hello world!</div> • </body> • </html>

More Related