Merge pull request #62 from creative-commoners/pulls/3.2/remove-search-default

FIX Remove search field value related logic, a placeholder is used instead now
This commit is contained in:
Robbie Averill 2018-11-26 11:51:13 +01:00 committed by GitHub
commit 179fe14554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 14 deletions

View File

@ -2,21 +2,8 @@ jQuery.noConflict();
(function($) {
$(document).ready(function() {
/* removes text from search form on focus and replaces it on unfocus - if text is entered then it does not get replaced with default on unfocus */
// L is a magnifying glass icon in the font
$('#SearchForm_SearchForm_action_results').val('L');
var searchField = $('#SearchForm_SearchForm_Search');
var default_value = searchField.val();
searchField.focus(function() {
$(this).addClass('active');
if(searchField.val() == default_value) {
searchField.val('');
}
});
searchField.blur(function() {
if(searchField.val() == '') {
searchField.val(default_value);
}
});
if (!$.browser.msie || ($.browser.msie && (parseInt($.browser.version, 10) > 8))) {
var searchBarButton = $("span.search-dropdown-icon");