Skip to content

jQuery plugin for focusing textarea, input and contenteditable

License

Notifications You must be signed in to change notification settings

mateusmaso/jquery.focus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.focus Build Status

This library is an extension for jQuery which allows focusing on editable elements either at the beginning or ending.

Features

  • Textarea, input and contenteditable support.
  • Put cursor at the ending using focusEnd method.
  • Put cursor at the beginning using focusBegin method.

Dependencies

  • jquery.js (>= 2.1.0)

Examples

$("textarea, input[type='text'], [contenteditable]").focusBegin();
$("textarea, input[type='text'], [contenteditable]").focusEnd();

License

Copyright (c) 2012-2014 Mateus Maso. Released under an MIT license.