I am trying to add glyphicon in JS file used for showing error message. Is that possible and if it is how can I do that?
Here is the current code:
if (freeSpotFound == false) {
raiseError("Error!", "#add-item-error");
return;
}
Is it possible to add glyphicon before the "Error!"text?
It depends on what raiseError()
does
Try adding some HTML, and see if it works
if (freeSpotFound == false) {
raiseError("<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span> Error!", "#add-item-error");
return;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.