Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
Fixed invalid search placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
James Triantafylos authored and James Triantafylos committed Mar 8, 2019
1 parent 32c8441 commit df42f09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/js/postdata.js
Expand Up @@ -14,10 +14,14 @@ $( document ).ready(function() {
// Displays the loading message
$('#resultPalette').append('<h1 id="loadingMessage">Finding your palette...</h1>');

// Resets the inputs placeholder after a potential invalid search
$('#searchID').attr('placeholder', 'Search for a style...');

// Calls the AJAX POSTing function
ajaxPost();
}else{
$('#searchID').val('Please enter a valid keyword!');
// Changes the inputs placeholder to tell the user to enter a valid keyword
$('#searchID').attr('placeholder', 'Please enter a valid keyword!');
}
});

Expand Down

0 comments on commit df42f09

Please sign in to comment.