SharePoint Dragons

Nikander & Margriet on SharePoint

jQuery Caret Plugin

Let’s give a positive endorsement for the jQuery Caret Plugin which can be found at https://github.com/acdvorak/jquery.caret This library allowed us to find the current cursor position in a text area with code like this:

targetElement = $(“#myID”);
var currentCursorPosition = targetElement.caret();

Contrary to the other solutions we’ve tried, this one also worked flawlessly in MSIE 8!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: