# Can I show a modal from head\_tag

**URL:** <https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836>\
**Category:** Development\
**Created:** [September 11, 2023, 8:03am UTC](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836 "2023-09-11T08:03:48Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [February 8, 2024, 9:29am UTC](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836/9 "2024-02-08T09:29:15Z")

</div>

I’m not aware of any change to magnificPopup, but we do plan to remove it soon so I would recommend moving to the documented DModal API.

One thing which has changed recently is the way we load JQuery. It now becomes available slightly later in the boot process. So, `window.JQuery` may not be available until after Discourse has booted.

You can make your script run after boot by switching `<script>` for a Discourse ‘plugin initializer’:

```plaintext
<script type="text/discourse-plugin" version="0.8">

```

---

_[View the full topic](https://meta.discourse.org/t/can-i-show-a-modal-from-head-tag/289836)._
