Guest User

Guest User

  • Tech Writer
  • 611
  • 126.2k

Check condtion in jquery.

Oct 5 2020 11:24 PM
if ($("#CategoryImages").val() == "") {
}
else if ($("#Name").val() == "") {
} else {
swal({
title: "Confirmation?",
text: "Are you sure you want to Upload File?",
type: "warning",
confirmButtonClass: "btn-danger",
showCancelButton: true,
confirmButtonText: "Yes",
closeOnConfirm: false
},
 
it's me validation code. i have upload a image file it's working but i have upload other file like (video) it's not properly working .Bcz #CategoryImages").val() == "" it's null in case image and i have selected video file it's not null so else if call .
Please provide solution 

Answers (3)