This is about Javascript (using JQuery) Please could you tell me how could I replace the following lines of javascript code using JQuery? I would really appreciate your help! PLease, do not worry about the entirely code functionality. I only need the JQuery replacement of the following lines. That is all! Thanks in advance! var titleInput = document.getElementById("title"); var custTtitle = titleInput.value.trim(); titleInput.value = custTtitle; if (custTtitle === "") { errorMessage += "Your title name cannot be empty. "; var border = document.getElementById("title"); border.style.border = "2px solid red"; } document.getElementById("title").value = ""; document.getElementById("title").style.removeProperty('border');
This is about Javascript (using JQuery)
Please could you tell me how could I replace the following lines of javascript code using JQuery? I would really appreciate your help!
PLease, do not worry about the entirely code functionality. I only need the JQuery replacement of the following lines. That is all!
Thanks in advance!
var titleInput = document.getElementById("title");
var custTtitle = titleInput.value.trim();
titleInput.value = custTtitle;
if (custTtitle === "") {
errorMessage += "Your title name cannot be empty.
";
var border = document.getElementById("title");
border.style.border = "2px solid red";
}
document.getElementById("title").value = "";
document.getElementById("title").style.removeProperty('border');
Trending now
This is a popular solution!
Step by step
Solved in 2 steps