i have the following SweetAlert Code..
As Jeremy Thille found out in his commentary on Oct. 31 '17 at 10:36:
You do not need to use the option "content" for a simple link in the text. The option "text" can only display pure text, no html. However, the option "html" can display html.
Not to be confused with the old version SweetAlert 1.X: There you had to set html = true.
In SeewtAlert2, the html is set directly in the "html" option. Do not use option "text" in this case.
Works fine in sweetAlert.version = '6.9.1';
Example of Jeremy Thille:
$('.patient-details').click(function(e) {
e.preventDefault();
var $this = $(this)
var name = $this.data('name');
var gender = $this.data('gender');
var age = $this.data('age');
var country = $this.data('country');
var address = $this.data('address');
var report = $this.data('report');
swal({
title: name,
html:
"Gender: " + gender +"
" +
"Age: " + age +"
" +
"Country: " + country +"
" +
"Address: " + address +"
" +
"Report: " + report +"
" +
"Report " +
"and other HTML tags"
});
});
https://codepen.io/jeremythille/pen/wPazMw