I have a <li>
element in which text is being appended from a controller. If the text is: "Email already exists." i want to append a link otherwise, i dont want to append anything.
I have the following function in jQuery, but it just doesn't work:
if ($("#validat ul li").indexOf("Email") >= 0)
{
$("#validat ul li").append("<a href='@Url.Action("ForgotPassword","Auth")'>Forgot password?</a>");
}
What am i missing?