Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Liam Clancy http://www.metafeather.net/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

Disable Shift+Click selection in browsers

I wanted the table to allow the user to select a range of rows with a Shift+Click… The problem is that, by default, the browser will select the page’s text content. This isn’t something you’ll want to do very often but it is possible to get around this:

Firefox can do this from your CSS:

table {

    -moz-user-select: none;
}
On the table element IE needs:

the_table_node.onselectstart = function () {

    return false;
};
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed