1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Close Thread Tools Menu with JS

Discussion in 'XenForo Development Discussions' started by xf_phantom, Feb 11, 2014.

  1. xf_phantom

    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: Feb 11, 2014
  2. Daniel Hood

    Daniel Hood Well-Known Member

    Maybe this?

    Code:
    $('.PopupControl.PopupOpen').click();
     
    xf_phantom likes this.

Share This Page