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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sordid-dragon

v2.2.1

Published

jQuery plugin for vertical sorting.

Downloads

5

Readme

Sordid Dragon

jQuery plugin for vertical sorting.

Tested on:

  • Chrome
  • Firefox
  • IE10-11
  • Edge
  • Safari
  • Android
  • iOS
  • Microsoft Surface
  • Needs long press to initiate drag, until pointer events are implemented here

Usage

Call sordidDragon() on a jQuery selector to make its immediate children sortable:

settings = {}
$(".list").sordidDragon(settings);

To remove all event listeners (and disable dragging) specify "destroy" as the argument:

$(".list").sordidDragon("destroy");

or

settings = {}
$(".list").sordidDragon("destroy", settings);

Settings

Option | Type | Default | Description ------ | ---- | ------- | ----------- handle | string (CSS selector) | $(element).children() | Change where you want the dragger handle to be. Defaults to the whole children element. childSelector | string (CSS selector|jQuery selector) | $(element).children() | To only allow a subset of the child elements to be dragged. NOTE: If a child element excluded by childSelector is in the middle of the list, you will be able to drag items from above it to below it or vice versa. However, if the child element excluded by childSelector is at the beginning or end of the list, you will not be able to drag items above/below it. ghostContainer | string (html|CSS selector|jQuery selector) | $(element) | Change where you want to append the ghost element when the user is dragging the element. sortStart | function(event, element) | undefined | Called when an element starts to be moved. sortEnd | function(event, element) | undefined | Called when an element has stopped being moved.

Dependencies

  • jQuery >= 1.7

Known issues

  • The "ghost" doesn't appear while dragging in IE8/IE9.
  • Edge case in Microsoft Surface: If draggable items do not have a CSS width set, the drag ghost image will be taken from the top of the web page. The workaround is to explicitly set the width of the draggable items.

Development

Run a local webserver from this directory and load the examples from the examples/ directory.

E.g. with http-server run http-server and test with the below URLs

Contributing

Compile to JavaScript prior to committing CoffeeScript changes:

./build.sh

Release

Releasing for Bower

  • Bump the version
    • Comment at the top of src/sordid-dragon.jquery.coffee
    • Version field in bower.json
  • Commit and tag as vX.Y.Z

Releasing for NPM

  1. Bump the version npm version (major|minor|patch)
  2. Update the CHANGELOG.md
  3. Publish to npm npm publish
  4. Push all updates to repo git push --follow-tags

TODO

  • Remove flickering on desktops when elements are of different heights.

  • In Firefox there are some bugs if something other than a child element is dragged onto one of the child elements.

  • Add support for pointer events