I\'m implementing item selection functionality in javascript (using jQuery). item is a li that contains some html.
the user can click on one item (makes it select
Try a combo of JavaScript and css to prevent the selection in the first place:
$('li').attr('unselectable', 'on'); // IE
css (for browsers not IE):
li {
user-select: none; /* CSS3 (little to no support) */
-ms-user-select: none; /* IE 10+ */
-moz-user-select: none; /* Gecko (Firefox) */
-webkit-user-select: none; /* Webkit (Safari, Chrome) */
}