• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1172
  • Last Modified:

How do you get the text selection in a text field or text area with JQuery?

Seems like this would be a no-brainer, but after 2 hours of searching, I cannot find anything that explains how to retrieve the selectionStart, selectionEnd of a text field or textarea using JQuery.

I can't even find a UI plugin that will do this.  Is it even possible or do I have to write javascript for IE and FF every time I want to do this?
1 Solution

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now