I have a table, and I\'m allowing users to \'select\' multiple rows. This is all handled using jQuery events and some CSS to visually indicate the row is \'selected\'. When
Just one note on the answer from Cleiton above - the code sample seems to work well, but in order to be a good citizen in the jQuery world, you should return the jQuery object at the end of the function so that it's chainable - a simple one-line addition fixes that up:
jQuery.fn.extend({
disableSelection : function() {
this.each(function() {
this.onselectstart = function() { return false; };
this.unselectable = "on";
jQuery(this).css('-moz-user-select', 'none');
});
return this;
}
});
Cheers, hope this is helpful.