Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to embedd HTML in an alertify.js alert?

I wanted to use Alertify.js to embed a Qualtrics survey, but I do not know if it is possible to pass in an HTML snippet (possibly an iframe?) instead of just text for the message of the alert.

Does anyone know if it is possible or how it might be done?

like image 832
pocketfullofcheese Avatar asked Oct 16 '13 02:10

pocketfullofcheese


2 Answers

I figured out a way around this, with a little jQuery. Place the following after you trigger the alert:

$('.alertify-message').append($.parseHTML('<whatever><html><you><want>'));
like image 168
pocketfullofcheese Avatar answered Sep 27 '22 16:09

pocketfullofcheese


Just pass html in message. For ex:

 alertify.error('<span> You should <a href="#">confirm</a> email </span>'); 
like image 20
Iga Uga Avatar answered Sep 27 '22 16:09

Iga Uga