ConditionalJquery
by Pugazh
HTML
Text
<input type="text">
<button>Click Me</button>
JavaScript
$("button").on("click", function() {
if ($("[type='text']").val() == "") {
$(this).css("border", "2px solid red");
}
});
by Pugazh
Text
<input type="text">
<button>Click Me</button>
$("button").on("click", function() {
if ($("[type='text']").val() == "") {
$(this).css("border", "2px solid red");
}
});