Skip to content

Instantly share code, notes, and snippets.

@Bewitchedyegor
Created October 12, 2017 14:33
Show Gist options
  • Select an option

  • Save Bewitchedyegor/69ce5ca5636efa82dba906e7b9248956 to your computer and use it in GitHub Desktop.

Select an option

Save Bewitchedyegor/69ce5ca5636efa82dba906e7b9248956 to your computer and use it in GitHub Desktop.
Check if input value is empty and display a message inside
$('.js-checkWeb').click(function () {
if ($('#banner_link').val() === '') { //check if value is empty
$('#banner_link').val('your message here').css('color', 'red');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment