I was wondering if some jQuery expert would be so kind to convert the below script to jQuery. I am having trouble converting it myself and would much prefer to use a jQuery equivalent.
What I am trying to do is simply remove the default value of 'Search' from a keyword field onSubmit, as the user can leave the keyword field blank.
function clearValue() {
var searchValue = document.getElementById("global-search").value;
if (searchValue == "Search") {
document.getElementById("global-search").value = "";
}
}
Any help would be much appreciate.