Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Lightbox issue with Ajax Post filtering
(1 viewing) (1) Guest
"ARI Fancy Lightbox" WordPress plugin
Go to bottomPage: 1
TOPIC: Lightbox issue with Ajax Post filtering
#67196
Lightbox issue with Ajax Post filtering 3 Years, 5 Months ago Karma: 0
Hello,

I am using the Search & Filter Pro (searchandfilter.com) plugin to make my posts sort- & filter able. I am using this with Elementor Pro & Ele Custom Skin to make designed post lists.
I have now an PDF, which is opened inside the ARI Fancy Lightbox Pro.
Everything works fine, until I enable the "Load results using Ajax?". Then the Pdfs are not loaded inside the Lightbox anymore, but are just opened as a "normal" link.

Is there any possibility to make the Lightbox work with AJAX results loading?


Thank you!
Last Edit: 2020/12/06 18:07 By albertvisuals.
The administrator has disabled public write access.
 
#67197
Re:Lightbox issue with Ajax Post filtering 3 Years, 5 Months ago Karma: 748
Hello,

Is "Search & Filter PRO" provide any javascript API to call a custom code when results are filtered?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#67200
Re:Lightbox issue with Ajax Post filtering 3 Years, 4 Months ago Karma: 0
Hello!
Thanks for your answer.

I have gotten the following reply from the plugin author:

If you are using Ajax in the form to refresh the results and this happens, and if you disable Ajax in the form and it does not happen, then what you need is to reapply the lightbox script to the posts after the Ajax has finished. You would need to know the actual script being used by your lightbox plugin, but the JavaScript would look like this:

<script>(function ( $ ) {
"use strict";
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
// call your lightbox script or function here
});
}(jQuery));</script>

What I have to add for the Lightbox script or function? And should I then put this in the theme's function.php or somewhere else?

Thanks!
The administrator has disabled public write access.
 
#67201
Re:Lightbox issue with Ajax Post filtering 3 Years, 4 Months ago Karma: 748
Open "ARI Fancy Lightbox -> Settings -> Advanced" page and populate "Custom JS code" textarea with the following code:

Code:


$(document).on("sf:ajaxfinish", ".searchandfilter", function() {
  ARI_FANCYBOX_INSTANCE.convertElements();
});



Regards,
ARI Soft
The administrator has disabled public write access.
 
#67206
Re:Lightbox issue with Ajax Post filtering 3 Years, 4 Months ago Karma: 0
Thanks very much! It works now
The administrator has disabled public write access.
 
Go to topPage: 1