Text Selection Snippets


Example code for moves cursor to the start of the selection (variations):

16 March, 2013   

CSS code example to change Text Selection Color

07 April, 2012   

CSS code to change Text Selection Color

15 March, 2011   

Some people are unaware that it is possible to change the color when you highlight text in your browser. It is so easy to with two selectors; just be careful you don’t ruin your site with it.

21 February, 2011   

Change Text Selection Color

Maxscript UI & Graphical RPManager - Control multiple object properties with single object for

23 May, 2018   

Add to bookmarks bar, select text, click it to get the word count.

Sometimes you have some information on your page and your visitors might want to copy it. The easiest way is to provide a mechanism that allows them to simply click a button to do so. You have to paste this code into the head of your web page:

Select all object that intersect each other

09 July, 2013   

Copy selected text by allowing user to simply click a button

07 March, 2013   

This simple and handy jQuery filter return a single random item from a selection of items. Credit to Waldek Mastykarz

01 November, 2012   

Example code for mMoving cursor to end of paragraph

If you're looking for a great way to enable your visitors to navigate your web site, this JavaScript drop down box with automatic redirect may be what you're looking for. This JavaScript code will enable your visitors to click on a drop down box to select the location on your web site in which they would like to navigate. Once they make their...

This Applescript take the selected file in Finder and open it with Sublime Text 2 (~/bin/subl). Using Alfred you can bind a global hotkey for this script, so you can edit your files with just a keypress, without worrying about the default editor.

Listed below are a handful of useful maxscript snippets of code that share with everyone.

How to disable Future Dates in AJAX Control Toolkit CalendarExtender Control. Author of this code is Mudassar Khan

12 May, 2012   

How to prevent users from selecting past or previous day dates in ASP.Net AJAX Control Toolkit CalendarExtender control. Author of this code is Mudassar Khan

14 February, 2017   

jQuery doesn't really have an .hasAttr() function. You might assume that it does, but alas, it does not.

Completely different version of populating a drop-down from an array. Can be simple or complex depending on the parameters. Supports JavaScript and auto-selection.

24 December, 2012   

jQuery plugin code to image selection