How do I close the box? (not using the CLOSE text)

Create issue
Issue #12 resolved
Former user created an issue

Hi, this is not a bug but I did not find a FAQ.

I load up Ajax content in the box and it looks great. I have a Vote button in box which I want to use to close the modal with. Do you know how the syntax would be for that?

It would be great with an example on the page on how to close the box when not using the Close link.


Comments (7)

  1. Angel Ruiz

    This is the only way I have found:

    $("P.close A").click();

    Please, let me know if you find something more "appropriate".


  2. Former user Account Deleted

    When I put $.superbox.close() in the function of the iframe i got the message "function not define". What make I wrong?

  3. claudioesparta

    Hey dude, After try alot i did this way before </head> put this <script> function closeModal() { $("P.close A").click(); } </script> After <body> <button class="btn btn-primary" onclick="javascript:closeModal()"></button>

  4. Log in to comment