How do I access FooBox lightbox jQuery Events API

0 votes

The FooBox docs say it's possible to hook into FooBox events using code like

jQuery('.fbx-instance').on('foobox.afterLoad', function(e) {
   alert(e.fb.item.url);
});

I'm not having any luck. I've tried putting this code inside the jQuery(document).ready() function and outside it and nothing's working. Has anyone had luck with this? Where does the code go?

Here's the page in the docs: http://docs.fooplugins.com/foobox/developers/foobox-jquery-events/

Aug 1, 2022 in Web Development by gaurav
• 23,260 points
551 views

1 answer to this question.

0 votes

Their docs site doesn't seem to be responding, but try this, let me know if it works:

(function ($) {
    $(function () {
        var myFoo = $('.fbx-instance').foobox({
            afterLoad: function (e) {
                alert("Hey I am loaded!");
            }
        });
    });
})(jQuery);
answered Aug 1, 2022 by rajatha
• 7,680 points

Related Questions In Web Development

0 votes
0 answers
0 votes
0 answers

How do I chain asynchronous AJAX calls with promises in jQuery to ensure proper order when modifying the DOM?

How do I chain asynchronous AJAX calls ...READ MORE

Nov 13, 2024 in Web Development by Nidhi
• 5,060 points
144 views
0 votes
0 answers

How do I fix performance issues caused by event delegation in a large DOM tree using jQuery?

How do I fix performance issues caused ...READ MORE

Nov 19, 2024 in Web Development by Nidhi
• 5,060 points
60 views
0 votes
1 answer

When using jQuery to traverse the DOM, how do I identify the current node being accessed?

To identify the current node being accessed ...READ MORE

answered Dec 13, 2024 in Web Development by Navya
37 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,414 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
16,114 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
23,547 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

answered May 12, 2020 in JQuery by Niroj
• 82,840 points
3,400 views
0 votes
1 answer
0 votes
1 answer

How can I create a simple page vertical scroll bar without using jQuery?

Surprisingly, there is not a great, simple ...READ MORE

answered Jun 22, 2022 in Web Development by rajatha
• 7,680 points
568 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP