wordpress/php-fpm/wordpress_files/themes/simple-catch/js/search.js
2020-05-22 01:40:23 +00:00

17 lines
419 B
JavaScript

/*
* Script for placeholder in search box
* Removes the default text onclick
*/
jQuery('.searchform .search').each(function() {
var default_value = this.value;
jQuery(this).focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
jQuery(this).blur(function() {
if(this.value == '') {
this.value = default_value;
}
});
});