Return to Snippet

Revision: 22475
at January 13, 2010 08:31 by jrobinsonc


Initial Code
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();
});

Initial URL

                                

Initial Description

                                

Initial Title
Remover un texto seleccionado luego de hacer doble clic con el mouse

Initial Tags
jquery, text

Initial Language
JavaScript