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 🙏

© 2026 – Pkg Stats / Ryan Hefner

row-selection

v3.0.2-beta

Published

generic row selection plugin using click / ctrl-click / shift-click

Readme

row-selection

Summary

jQuery based plugin enabling click, ctrl + click, shift + click behaviour using table/list like elements.

Install

$ npm install row-selection --save

Usage

<table class="facts-table">
    <tbody>
        <tr>
            <td>1.</td>
            <td>There are more lifeforms living on your skin than there are people on the planet.</td>
        </tr>
        <tr>
            <td>2.</td>
            <td>Bolts of lightning can shoot out of an erupting volcano.</td>
        </tr>
        <tr>
            <td>3.</td>
            <td>Chewing gum while you cut an onion will help keep you from crying.</td>
        </tr>
        <tr>
            <td>4.</td>
            <td>Earth has traveled more than 5,000 miles in the past 5 minutes.</td>
        </tr>
    </tbody>
</table>
'use strict';
$('.facts-table').uiSelectableRow({
  rowIdentifier: 'tr',
  selectRowIfTargetIs: 'td',
  selectedRowClass: 'fact-selected'
});
.fact-selected {
    background: #87ceeb;
    color: #fff;
}

Option

|Property|Type|Usage|Default|Required| |---|---|---|---|---| |rowIdentifier|string|CSS selector targeting the row. In case of table, it's usually 'tr', in case of list, it usually 'li'. This is element to which the 'selected' row class is attached to|tbody tr|yes| |selectRowIfTargetIs|array|Array of CSS selector, which if matches will select the row; selectRowIfTargetIs takes priority over selectRowIfTargetIsNot.|[]|optional| |selectRowIfTargetIsNot|array|Array of CSS selector, which if matched will not select the row.|[]|optional| |toggleOnClick|boolean|toggle selection on shift click|false|optional| |filterSelection|function|callback to filter selected rows; doesn't filter, if toggleOnClick is true||optional| |eventNs|string|event namespace|uiSelectableRow|optional| |eventType.toggleSelection|string|name for custom event type, 'toggleSelection'|toggle-selection|optional| |eventType.enable|string|name for custom event type, 'enable'|enable|optional| |eventType.disable|string|name for custom event type, 'disable'|disable|optional| |eventType.destroy|string|name for custom event type, 'destroy'|destroy|optional| |eventType.destroyed|string|name for custom event type, 'destroyed'|destroyed|optional| |eventType.shiftSelectable|string|name for custom event type, 'shiftSelectable'|shift-selectable|optional| |eventType.ctrlSelectable|string|name for custom event type, 'ctrlSelectable'|ctrl-selectable|optional| |dataAttr.rowIdentifier|string|name for custom data attribute, 'rowIdentifier'|data-row-identifier|optional| |dataAttr.selectRowIfTargetIs|string|name for custom data attribute, 'selectRowIfTargetIs'|data-select-row-if-target-is|optional| |dataAttr.selectRowIfTargetIsNot|string|name for custom data attribute, 'selectRowIfTargetIsNot'|data-select-row-if-target-is-not|optional| |dataAttr.disabled|string|name for custom data attribute, 'disabled'|data-disabled|optional| |dataAttr.shiftSelectable|string|name for custom data attribute, 'shiftSelectable'|data-shift-selectable|optional| |dataAttr.ctrlSelectable|string|name for custom data attribute, 'ctrlSelectable'|data-ctrl-selectable|optional| |dataAttr.selectedRowClass|string|name for custom data attribute, 'selectedRowClass'|data-selected-class|optional| |isDisabled|boolean|enable/disable the plugin|false|optional| |isShiftSelectable|boolean|enable/disable shift selectable|true|optional| |isCtrlSelectable|boolean|enable/disable ctrl selectable|true|optional| |selectedRowClass|string|name of the selected row class|ui-selectable-row-selected|optional| |containerHoverClass|string|name of the hover class|ui-selectable-row-hover|optional| |disableTextSelectionClass|string|name of the text selection disable class|ui-selectable-row-disable-text-selection|optional|

Example(s)

build example by running the following command and navigate to http://localhost:8080/example/index.html; ensure you run the example using a local server;

$ npm install
$ npm start

License

MIT