-1

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.

flintsburg
  • 209
  • 2
  • 11

2 Answers2

1

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.

flintsburg
  • 209
  • 2
  • 11
1

If you want to execute something when it opens, use afterOpen.

Marc-André Lafortune
  • 78,216
  • 16
  • 166
  • 166