Monday, October 20, 2014

Input Field for swap and helping

Posted by Gnani Palepu  |  No comments


 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  

 In order to make an Input Text field helpful, we normally display some default text inside it (For Example “Company Name”) and when user click on it, text disappears and user can enter the value for it.  
 You can try it yourself by using the following code snippet.  
 <!– jQuery: Helping Input Field –>  
 $(‘input[type=text]‘).focus(function(){    
       var $this = $(this);  
       var title = $this.attr(‘title’);  
       if($this.val() == title)  
       {  
         $this.val(”);  
       }  
 }).blur(function() {  
       var $this = $(this);  
       var title = $this.attr(‘title’);  
       if($this.val() == ”)  
       {  
         $this.val(title);  
       }  
 });  
 <!– HTML: Swap Input Field –>  
 <div>  
     <input type=”text”   
 name=”searchCompanyName”  
 value=”Company Name”   
 title=”Company Name” />  
 </div>  

 if you want more related search please click here  
 please help to other  
 http://scriptquery.blogspot.in/  


5:52 AM Share:

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
Proudly Powered by Blogger.
back to top