Created
August 23, 2014 15:57
-
-
Save lidplussdesign/490d40d68efe7889cc18 to your computer and use it in GitHub Desktop.
456shop v1.1 - Product post, review button issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global $:false */ | |
$(document).ready(function(){ | |
"use strict"; | |
// contact form 7 plugin | |
// clear input on focus | |
$('.wpcf7-text').focus(function(){ | |
if($(this).val()===this.defaultValue){ | |
$(this).val(''); | |
} | |
}); | |
// if field is empty afterward, add text again | |
$('.wpcf7-text').blur(function(){ | |
if($(this).val()===''){ | |
$(this).val(this.defaultValue); | |
} | |
}); | |
// comment form | |
// clear input on focus | |
$('.single-post #commentform input').focus(function(){ | |
if($(this).val()===this.defaultValue){ | |
$(this).val(''); | |
} | |
}); | |
// if field is empty afterward, add text again | |
$('.single-post #commentform input').blur(function(){ | |
if($(this).val()===''){ | |
$(this).val(this.defaultValue); | |
} | |
}); | |
// clear input on focus | |
$('#commentform textarea').focus(function(){ | |
if($(this).val()===this.defaultValue){ | |
$(this).val(''); | |
} | |
}); | |
// if field is empty afterward, add text again | |
$('#commentform textarea').blur(function(){ | |
if($(this).val()===''){ | |
$(this).val(this.defaultValue); | |
} | |
}); | |
// if field is empty afterward, add text again | |
$('#pmc_mailchimp input[type="text"]').blur(function(){ | |
if($(this).val()===''){ | |
$(this).val(this.defaultValue); | |
} | |
}); | |
// clear input on focus | |
$('#pmc_mailchimp input[type="text"]').focus(function(){ | |
if($(this).val()===this.defaultValue){ | |
$(this).val(''); | |
} | |
}); | |
// if field is empty afterward, add text again | |
$('#pmc_mailchimp input[type="text"]').blur(function(){ | |
if($(this).val()===''){ | |
$(this).val(this.defaultValue); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment