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 comment