Jump to content

olex

Member
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    olex got a reaction from Hunteq in Can I disable viewers 'dragging and dropping' my jpeg images onto their desktop?   
    You can probably just use the same preventDefault technique on events other than just "contextmenu":E.g. for drag:
    $(this).bind("ondragstart", function(e) { e.preventDefault(); }); $(this).bind("drag", function(e) { e.preventDefault(); });
    This would also disable dragging for other purposes, it's probably best to just target img tags with your event handlers, like so:

    $("img").bind...
    Nevertheless, someone could easily go into the HTML inspector and pull out your image out of the page. You can't prevent a developer or someone determined from snagging the image.
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.