Close Thread Tools Menu with JS

xf_phantom

Well-known member
Is there a way to close the open thread tools menu with some js code??
I have a link in the menu, which should run some js code and close the menu again...

I've tried
Code:
this.$popupControl = $link.closest('.PopupControl');
this.$popupControl.click();
but nothing happens:(

I've also tried to get it from
Code:
XenForo._PopupMenuActiveGroup;
but it's not defined:(


Edit:
Code:
  $(document).click();
worked, but i hope there's a better solution:D
 
Last edited:
Top Bottom