Announcement :

Try our newly launched website www.Technicalbaba.com Token Number - 1techbaba1

Friday, 11 October 2013

How stop images from dragging


How to avoid any image from dragging effect ? very easy just use these methods as given bellow -


Method  1 -

Suppose your image code is :


<img  src="11.png" alt="11.png" title="11.png">

Add 
draggable attribue and your code will be - 


<img draggable="false"  src="11.png" alt="11.png" title="11.png">


( Not working use 2nd method )




Method  2 -

Suppose your image code is :

<img  src="11.png" alt="11.png" title="11.png">

Add ondragstart
 event and your code will be - 



<img ondragstart="return false;" src="11.png" alt="11.png" title="11.png">

( Not working use 3rd method )


Method  3 -

Suppose your image code is :


<img  src="11.png" alt="11.png" title="11.png">

Add onmousedown
 event and your code will be - 



<img onmousedown="return false;" src="11.png" alt="11.png" title="11.png">

( Not working use Last & combined method )


Combine All and it will works every time - 

Suppose your image code is :

<img  src="11.png" alt="11.png" title="11.png">

Add all attribute &
 events and your code will be - 

<img draggable="false"  ondragstart="return false;" onmousedown="return false;" src="11.png" alt="11.png" title="11.png">


Any issue , feel free to comment -



Demo :

1. Draggable : 





2. Non-Draggable : 









Share it Please

Shashank Mishra

He is a blogger/website designer and developer.he is founder of www.technicalbaba.com and also loves web programming.

1 comments:

We welcome's you to post your comments here , Our editorial team will review and reply to your valuable comment.Thank you to connect with us.














1. HTC offers bloggers to write a post for us , you can use your links too.


2. HTC offers ad networks to publish their ads in very low cost.


Copyright @ 2013 Ability 2 Crack. Designed by Templateism | Re-designed By Shashank MIshra