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?

Can I get it working for images in MapsMarker Pro?
(1 viewing) (1) Guest
"ARI Fancy Lightbox" WordPress plugin
Go to bottomPage: 1
TOPIC: Can I get it working for images in MapsMarker Pro?
#66010
Can I get it working for images in MapsMarker Pro? 4 Years, 3 Months ago Karma: 0
Hi, Your plugin is working fantastically now - thanks.

I recently installed MapsMarker Pro, which has images that don't open in the Fancy Lightbox.

Here's an example

Recent rides


Have a look at the image at the bottom (camper van) and also the image if you click the marker on the map. Is there any way I can get these images to open in a lighbox? I don't mind doing coding if necessary.

Thanks

Vinner
The administrator has disabled public write access.
 
#66023
Re:Can I get it working for images in MapsMarker Pro? 4 Years, 3 Months ago Karma: 748
Hello,

Open "ARI Fancy Lightbox -> Settings -> Advanced" page and populate "Custom JS code" parameter with the following code:

Code:


$(document).on('click', '.mmp-list-popup A[href*=jpg]:not(.fancybox)', function(e) {
            if (e.isDefaultPrevented()) {
                return ;
            };

            var $this = $(this),
                instance = window['ARI_FANCYBOX_INSTANCE'];
            $this.addClass('ari-fancybox');
            instance.convertElements();

            e.stopImmediatePropagation();
            setTimeout(function() {
                $this.click();
            }, 0);

            return false;
        });



This code for PRO version.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#66028
Re:Can I get it working for images in MapsMarker Pro? 4 Years, 3 Months ago Karma: 0
Hi, That works perfectly, thanks!

However, it works for the pictures on the left list, but not the images you get when you click a map marker. I have managed to get those working by adding another block of code identical to yours, but using .mmp-popup-text as the target.

So now I have two blocks of almost identical code. How would I modify your selector to also include anchors inside the .mmp-popup-text class?

My long-winded version below. Thanks for your help

Vinner

$(document).on('click', '.mmp-list-popup A[href*=jpg]:not(.fancybox)', function(e) {
if (e.isDefaultPrevented()) {
return ;
};

var $this = $(this),
instance = window['ARI_FANCYBOX_INSTANCE'];
$this.addClass('ari-fancybox');
instance.convertElements();

e.stopImmediatePropagation();
setTimeout(function() {
$this.click();
}, 0);

return false;
});

$(document).on('click', '.mmp-popup-text A[href*=jpg]:not(.fancybox)', function(e) {
if (e.isDefaultPrevented()) {
return ;
};

var $this = $(this),
instance = window['ARI_FANCYBOX_INSTANCE'];
$this.addClass('ari-fancybox');
instance.convertElements();

e.stopImmediatePropagation();
setTimeout(function() {
$this.click();
}, 0);

return false;
});
The administrator has disabled public write access.
 
#66031
Re:Can I get it working for images in MapsMarker Pro? 4 Years, 3 Months ago Karma: 748
Use the following code:

Code:


$(document).on('click', '.mmp-list-popup A[href*=jpg]:not(.fancybox),.mmp-popup-text A[href*=jpg]:not(.fancybox)', function(e) {
            if (e.isDefaultPrevented()) {
                return ;
            };

            var $this = $(this),
                instance = window['ARI_FANCYBOX_INSTANCE'];
            $this.addClass('ari-fancybox');
            instance.convertElements();

            e.stopImmediatePropagation();
            setTimeout(function() {
                $this.click();
            }, 0);

            return false;
        });



Regards,
ARI Soft
The administrator has disabled public write access.
 
#66040
Re:Can I get it working for images in MapsMarker Pro? 4 Years, 3 Months ago Karma: 0
Thanks again!

Vinner
The administrator has disabled public write access.
 
Go to topPage: 1