Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
-1
rated 0 times [  3] [ 4]  / answers: 1 / hits: 32209  / 12 Years ago, mon, june 25, 2012, 12:00:00

I want to disable click on a certain <div> so that when you select the text on it, the text doesn't select.



I tried writing onclick=return false; like in this fiddle http://jsfiddle.net/mageek/X6hqD/ but it doesn't work.



How can it work? (My goal isn't just disabling the select, it's the whole click).


More From » javascript

 Answers
23
document.getElementById('div1').onmousedown = new function (return false);

[#84686] Saturday, June 23, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
seth

Total Points: 307
Total Questions: 114
Total Answers: 96

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;