Code Monkey home page Code Monkey logo

jquery-editable-select's Introduction

A jQuery plugin that adds a user entered value to a select element.

How it works:
1) The select element's options are copied to a list.
2) A textbox is put in place of the select element. The select is then hidden.
3) When the textbox gains focus the list is displayed. You can choose the option with the mouse or arrow keys.
4) When an item is selected the textbox and the original select element have their values updated. This is important as it allows you to make the select element editable without changing any data binding code which may already be wired to the select element.
5) If a user enters custom text in the textbox an option is appended to the original select element. That option is given the attribute:
   data-jqes="editable"
   If another change is made to the textbox this option element is updated to the new value.

Other notes:
The plugin assumes that if you are allowing a custom entry the option element's values are equal to the text value.
The plugin will attempt to display the list without a scroll bar by using space above or below. Preference is given to showing the list under the textbox.

Plugin Options:
enableiframe - Defaults to false (disabled). Enable for IE 6/7 support.

jquery-editable-select's People

Contributors

offner avatar

Watchers

 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.