0

I need to disable the default drag & drop (and selection) on my HTML.

I try in first time: user-select: none; pointer-events: none; in CSS. It's works, but my click event javascript are disabled too... (and I need it)

so, is there a better solution that replace pointer-events: none; by

$document.on("dragstart", 'img', function(e) { e.preventDefault(); });

Can we do it in CSS only?

thx.

Matrix
  • 3,458
  • 6
  • 40
  • 76
  • possible duplicate of [Preventing click event with jQuery drag and drop](http://stackoverflow.com/questions/1771627/preventing-click-event-with-jquery-drag-and-drop) – mechalynx Sep 29 '14 at 02:17
  • not realy... It's not drag & drop of jQuery here – Matrix Sep 29 '14 at 12:06
  • @ivy_lynx can you delete "duplicate" tag plz, it's not the same problem. thx. – Matrix Sep 29 '14 at 23:39

0 Answers0