/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function clearSelection() { if(document.selection && document.selection.empty) { document.selection.empty(); } else if(window.getSelection) { var sel = window.getSelection(); sel.removeAllRanges(); } } $(element).bind('dblclick',function(event){ //hacer algo clearSelection(); });