assets/js/logic.js
// Check that the search query field isn't empty
Check that the search query field isn't empty
Check that the search query field isn ' t empty
function formValidation() {
  if (subject == "") {
    alert("Please enter a valid search term");
    return false;
  } else {
    if (subject !== "")
      $("#searchedTerms").append("<button type='button' id='bananas' onClick='searchGiphy(subject)' class='btn btn-light'>" + subject + "</button>");
    $("form").trigger("reset");
  }
}
function formValidation ( ) { if ( subject == "" ) { alert ( "Please enter a valid search term" ) ; return false ; } else { if ( subject !== "" ) $ ( "#searchedTerms" ) . append ( "<button type='button' id='bananas' onClick='searchGiphy(subject)' class='btn btn-light'>" + subject + "</button>" ) ; $ ( "form" ) . trigger ( "reset" ) ; } }
Check that the search query field isn't empty
Check that the search query field isn ' t empty
// Clear text in field