Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 389687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:53:28+00:00 2026-05-12T15:53:28+00:00

Greetings, I am using facebox popup jquery plugin. In their JS they have the

  • 0

Greetings,

I am using facebox popup jquery plugin.
In their JS they have the following event

/*
   * Bindings
   */
  $(document).bind('close.facebox', function() {
    $(document).unbind('keydown.facebox')
    $('#facebox').fadeOut(function() {
      $('#facebox .content').removeClass().addClass('content')
      hideOverlay()
      $('#facebox .loading').remove()
    })  
  })

It just close the Popup.
I want to hook some of my own code on this close.facebox, for test and alert would do.

So in my js on my web page i did the following:

<script type="text/javascript">
    // listen to close action on popup


    // submit request
    $("#request-submit").click(function(){

        // Show popup
        jQuery.facebox('something cool');

        // Close Popup Hook
        $(document).bind('close.facebox', function() {
            alert("close action");
        });

    });
</script>

It looks ok but the problem is that it does not work perfectly:

On first popup, the close action displays an alert on close.
On Seconde popup, the close action displays TWO alerts.
On Third popup, the close action displays THREE alerts one after an other.

You get the point, it seems like the old ‘Query.facebox(‘something cool’);’ instances are still there listening for the close event.

Any way of fixing this ?
Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:53:29+00:00Added an answer on May 12, 2026 at 3:53 pm

    I did the following,

    On the JS lib
    
    $(this).trigger('pre_close.facebox');
    

    // Close alert
    $(document).bind('pre_close.facebox', function() {
        alert("close action");
        $(document).unbind('pre_close.facebox');
    });
    

    But that’s not too good since i have to hack the default facebox lib.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 247k
  • Answers 247k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your problem lies in your if statement: if (state =… May 13, 2026 at 8:36 am
  • Editorial Team
    Editorial Team added an answer You should either embrace stored procedures, or make your database… May 13, 2026 at 8:36 am
  • Editorial Team
    Editorial Team added an answer I'm assuming the five method calls inside Form_Load are all… May 13, 2026 at 8:36 am

Related Questions

Greetings, I am trying to tear down query returned from find call using containable
Greetings All! I am having some troubles on how to execute thousands upon thousands
I am using nhibernate for my OR persistence and I store a list of
I am new here so first of all my greetings to you I am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.