after successful ajax call I have jquery open toast function:
function successMessage() {
$("#toast_success").show("slow").delay(3000).hide("slow");
}
Some people might want to close that toast before 3s [ delay(3000) ]:
$(".toast_close").on('click', function() {
$("#toast_success").hide("slow");
});
Unfortunately on click event do not work, message dissapears after 3seconds, and thats it. Any suggestions how to make work "$(".toast_close").on('click', function()" ?