Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- if(!Modernizr.input.placeholder){
- $("input").each(
- function(){
- if($(this).val()=="" && $(this).attr("placeholder")!=""){
- $(this).val($(this).attr("placeholder"));
- $(this).focus(function(){
- if($(this).val()==$(this).attr("placeholder")) $(this).val("");
- });
- $(this).blur(function(){
- if($(this).val()=="") $(this).val($(this).attr("placeholder"));
- });
- }
- });
- }
- });
Add Comment
Please, Sign In to add comment