S
S
Sergey Nizhny Novgorod2016-04-28 06:23:24
HTML
Sergey Nizhny Novgorod, 2016-04-28 06:23:24

How to get rid of image drag during layout?

Hello.
The task is, if I just insert images into html through tags, then the images are inserted. But if you click on it with the left mouse button and drag it, then we will drag the "shadow" of this image. How can you get rid of this thing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serj-One, 2016-04-28
@Terras

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question