# Open the login popup Or trigger event when button is pressed

**URL:** https://meta.discourse.org/t/open-the-login-popup-or-trigger-event-when-button-is-pressed/136385
**Category:** Development
**Created:** [December 18, 2019, 8:29am UTC](https://meta.discourse.org/t/open-the-login-popup-or-trigger-event-when-button-is-pressed/136385 "2019-12-18T08:29:50Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [December 18, 2019, 8:39am UTC](https://meta.discourse.org/t/open-the-login-popup-or-trigger-event-when-button-is-pressed/136385/2 "2019-12-18T08:39:52Z")

</div>

`post:after` should work if you want to add new elements to the bottom of a post. Note that you have a space between `post:` and `after`.

I think this is related to what you’re trying to do.

> [@How to add customer HTML after "post\_1"](https://meta.discourse.org/t/how-to-add-customer-html-after-post-1/123068/2):
>
> Posts are [widgets](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347) which means what you’re trying to do will involve a bit more work that just adding html. Discourse themes have the ability to [decorate widgets](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648#heading--4-c-6) so you can leverage on that. Decorating a widget is explained in the link above so let’s focus on what you’re trying to do - add markup after the first post in every topic. Start by adding the markup to all posts. So something like this \<script type="text/discourse-plugin" version="0.8"\> api.decorateWidget("post:after", helper =\> { …

If you still have problems, then please post the rest of the code you’re using.

---

_[View the full topic](https://meta.discourse.org/t/open-the-login-popup-or-trigger-event-when-button-is-pressed/136385)._
