Giter Site home page Giter Site logo

jqueryautocompleteplugin's Introduction

#jQuery Autocomplete Plugin 1.2.2#

##About this jQuery plugin## Jörn Zaefferer’s (now deprecated into jQuery UI) jQuery Autocomplete Plugin, with a small modification to enable UP/DOWN arrow keys, allowing navigation of input element text. This is particularly useful in cases where autocomplete is used in a textarea element where navigation of text via UP/DOWN arrow keys may be necessary. The tiny fix is documented with comments in the relevant lines on the development file (jquery.autocomplete.js). The .min and .pack files have the fix without specific annotation within the code.

We use it in Claritty.com for when a user wants to write a twitter username or a previously used hashtag within a new tweet, so “@” and “#” are trigger the script. While not triggered, though, the plugin still hijacks the UP/DOWN arrow keys making navigation of the text a pain in the ass when the user has multiple lines. This modification prevents this behavior, hijacking the arrow keys only when the autocomplete script has been triggered.

The original plugin is now deprecated, but this mod works well with jQuery 1.3.2 thru 1.4.4.

##Documentation## Introduction to the original plugin, and an explanation of original plugin options are included in the docs folder. (Documentation at the jQuery site is expected to shut down eventually.)

This modification shouldn’t break any of the options discussed at the these documentation files.

##Abridged Changelog## ####1.2.2 --AGA####

  • Merged agmcleaod’s fork: Added failure to the options hash: failure

  • Merged borkor’s fork: New option not to jump to first or last position: scrollJumpPosition

  • Deleted silly console.debug() line left over from testing.

####1.2.1 --AGA####

  • Added option to activate select list with one click instead of two. clickFire is false by default. (Requested/recommendation by fgosfacdjtq.)

  • Added option to forgo input focus on item select. inputFocus is set to true by default, but setting it to false in the options will cancel this behavior.

  • Circumvent browser JS bug when user clicked on results list scrollbar and then clicked outside of the list that caused the list to not hide.

  • Changed hijacking of PAGEUP/PAGEDOWN keys to prevent default behavior only when selections list is visible. Helps text navigation inside input element.

####1.2 --AGA####

  • Use recursive merging when extending setOptions. (Request/recommendation by smarques.)

####1.1.1 --AGA####

  • Changed hijacking of UP/DOWN arrow keys to prevent default behavior only when selections list is visible. Helps text navigation inside input element.

See changelog.txt for pre-1.1.1 entries by original author.

##Licensing## As with the original Plugin, this modification is dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html

jqueryautocompleteplugin's People

Contributors

agarzola avatar agmcleod avatar mhulse avatar borkor avatar tablatronix avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.