문제

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?

도움이 되었습니까?

해결책

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>'));

다른 팁

Just pass html in message. For ex:

 alertify.error('<span> You should <a href="#">confirm</a> email </span>'); 

Here is the proper way to use custom HTML in an alert:

var alertifyObject = alertify.notify('Old content', 'error');
alertifyObject.setContent('<b>New content</b>');

setContent accepts either a string or a DOM object.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top