Search code examples
jquerygallerylightboxprettyphoto

PrettyPhoto image save as


I have a problem with the class pretty photo, I have no possible meaning to save the image that I'm seeing, there is a solution to this problem?

This is class jquery

http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/

is possible to give save image as... if i try the right click... I don't have the option to save the image

a try change css, but the problem is not them

prettyphoto is a clone of lightbox my version is 3.0


Solution

  • you could use this:

    $('img').bind('contextmenu', function(e) {
        return false;
    }); 
    

    or this other solution that you can find in this guy blog:

    function nocontext(e) {
            var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
            if (clickedTag == "IMG") {
                alert(alertMsg);
                return false;
            }
        }
        var alertMsg = "Image context menu is disabled";
        document.oncontextmenu = nocontext;
    

    or you could use something like this to plugin to manage or make right click menus, according to their docs and sample you only need this to create a custom menu

    var menu1 = [
      {'Option 1':function(menuItem,menu) { alert("You clicked Option 1!"); } },
      $.contextMenu.separator,
      {'Option 2':function(menuItem,menu) { alert("You clicked Option 2!"); } }
    ];
    $(function() {
      $('.cmenu1').contextMenu(menu1,{theme:'vista'});
    });
    

    But check it out and do whatever works better for you.