npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-uix-multiselect

v2.0.0

Published

jQuery UI MultiSelect based on jquery.uix.multiselect

Downloads

208

Readme

jQuery UIx Multiselect

Version 2.0

Preview

Introduction

This widget is a complete rewrite of the previous version. Why a new rewrite? Because the original widget's attempt was to create a all-in-one-out-of-the-box-multi-featured SELECT replacement and thus failed to be compliant with the DOMElement's behavior and limitations. Notably, it failed to :

  • update the option items when modifying the SELECT element directly
  • didn't support disabled items
  • didn't support item groups
  • etc.

Also, it quickly became slow when loading a few hundred items and some branches had drag and drop issues.

Release notes

This widget is stable enough to be used in staging environments. However it is still under development, in testing phase, as some features may require more feedbacks yet! (Mainly browser compatiblity.) At this point, expect minor bug fixes within 72 hours, and there will be no more features planned at this point.

The compressed (minified) version is created using the YUI Compressor.

Requirements

  • jQuery 1.8+
  • jQuery UI 1.9+

Features

  • Support for disabled options
  • Support for option groups
  • Option group collapsable
  • Draggable drop and/or sortable enabled
  • Mouse selection mode (click, dblclick)
  • Support for predefined or custom sort functions
  • Searchable
  • List layout and select direction (horizontal or vertical)
  • Custom item renderer

Usage

Note : Even though it is a complete rewrite of the widget, I kept the multiselect widget name (but it is declared as uix.multiselect instead of ui.multiselect).

$('selector').multiselect();

To programmatically select/deselect, add/modify/remove items, you may access and modify the DOMElement directly, then call the refresh widget method to update it.

$('selector').append("<option value='item1'>My Item 1</option>")
             .multiselect('refresh');

// manually filter available options
//   This will only render visible the available items containing 'My Item' (case insensitive)
$('selector').multiselect('search', 'my item');

$('selector').multiselect('destroy');  // restore original element

See wiki documentation for more information.

TODO

  • add custom item rendering support (needs more tests)
  • HTML5 ARIA attributes
  • Make all options as mutable as possible after initialization.
  • Test in all major browsers (not fully tested)
  • Mobile support
  • Code cleanup
  • etc.

Limitations

  • When setting sortable option to true, options can only be reordered within their own groups. That is, an option cannot be reordered between two options of a different group. As this widget's purpose is not to extend the original element's behaviour beyound user interaction and presentation, this limitation shall not be lifted for the time being.
  • This widget was designed for modern browsers usage. It is working fine in IE7+, Firefox and Chrome. Note that it will not work in quirks mode. There will be little to no support for non standards compliant browsers.