Jump to content

Custom JS and Fancybox


HAIRWEBSHOP

Recommended Posts

Hello,

 

I try to discourage using our edited product images by blocking right-click and dragging.
To do this, I've added the following custom javascript.
$('img').bind('contextmenu', function(e) {
    return false;
});


$('img').on('dragstart', function(event) { event.preventDefault(); });

However, when the user clicks on the image to enlarge using a fancybox, it does block them anymore.
How can I prevent users from right-clicking and dragging images inside prestashop default-theme fancybox?

 

Thank you in advance!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...