Imagine you have set up 4 persistent logs,
var log = alertify.closeLogOnClick(false).delay(0).log("Hello world!");
var log1 = alertify.closeLogOnClick(false).delay(0).log("Hello world1!");
var log2 = alertify.closeLogOnClick(false).delay(0).log("Hello world2!");
var log3 = alertify.closeLogOnClick(false).delay(0).log("Hello world3!");
This results in creating 4 logs.
To remove a specific log, consider using an if condition as needed.
Firstly, display all the logs,
$(".alertify-logs")
By executing this command, you will see all the items,
$(".alertify-logs").children
and verify with the log text to delete it.
For example:
$(".alertify-logs").children[0].innerText == "Hello world!"
then
$(".alertify-logs").children[0].remove();