Closed gishman closed 4 years ago
Hello.
I guess it's not concerned with this toast plugin.
Just appending to body
instead of using $.toast(), you will see the same issue:
$('body').append('<span onclick($("#Clubmembers").tabulator("deselectRow", "1111"))>Smith, Madelyn');
The correct markup with onclick
attribute should be not onclick(...)
but onclick="..."
. Then try the below:
$.toast({
text: "<span onclick=\"$('#Clubmembers').tabulator('deselectRow', '1111')\">Smith, Madelyn</span>"
});
That's not this plugin, but is either jQuery OR the browser (it could be either one). You can see this in a JS console with:
> var x = $('<span onclick($("#Clubmembers").tabulator("deselectRow", "1111"))>Smith, Madelyn</span>')
w.fn.init [span]
> x[0]
<span onclick($("#clubmembers").tabulator("deselectrow", "1111"))>Smith, Madelyn</span>
$.toast({ text: '<span onclick($("#Clubmembers").tabulator("deselectRow", "1111"))>Smith, Madelyn'})
results in :
<span onclick($("#clubmembers").tabulator("deselectrow",="" "1111"))="">Smith, Madelyn</span>