I'm using featherlight to call a file with ajax. It only consists of:
<script>
alert();
</script>
The scripts runs, I see the alert but it also renders it in plain text:
alert();
I can't figure out why.
I'm using featherlight to call a file with ajax. It only consists of:
<script>
alert();
</script>
The scripts runs, I see the alert but it also renders it in plain text:
alert();
I can't figure out why.
Digging into it, featherlight adds a featherlight-inner class to every element of "first level" that it finds on the page.
So solution is to put the script tag into the main tag.
If you want to execute something when it opens, use afterOpen
.