The WebApp Wizard Web development made magical

Documentation

Usage

JS

Simple, as usual. To init Editable Combo, just do the following:

$('my_select_box').editableCombo(options);

HTML

Any plain old HTML <select> element. Buttons and others are added automatically by the plugin.

CSS

Feel free to customize it to make it look better. In all cases, the default look is OK, but you might want to adapt it a little.

Options

The plugin provides several options so that you can make it work the way you want. Here there are:

  • comboBox: 'select:first'
    Selector for the <select> element
  • add: ':button:first'
    Selector for the "+" button
  • del: ':button:last'
    Selector for the "-" button
  • editableClass: 'editableOption'
    The class which will be applied to options that are editable
  • maxlength: 35
    The maximum length for options
  • multiple: [true, false]
    Whether to allow multiple selection or not
  • onAddOption: function(newVal, newLabel) {}
    Callback on adding action. First parameter is the value of the added option, second one is the label.
  • onRemoveOption: function(oldVal) {}
    Callback on removing action. The value of the removed option is passed as a parameter.
  • onEditOption: function(val, oldLabel, newLabel) {}
    Callback on editing action. First parameter is the value of the edited option, second one is the old label, last one is the new label.
Comments (1) Trackbacks (0)
  1. At this time it looks like WordPress is the preferred blogging platform
    out there right now. (from what I’ve read) Is that what you are using on your blog?


Leave a comment

(required)

You can use basic HTML to enlighten your comments. If you want to post some code, please use the <pre> tag. You can also use syntax coloring by adding class="syntax [language]". <pre class="syntax js"> will color your code as if it was JS code for instance.

No trackbacks yet.