Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
shift-js
Advanced tools
Readme
Use the shift key to select a range of elements, such as checkboxes and radio buttons.
Mimics Gmail's checkbox filter where you hold down the shift key to select ranges.
Install with npm: npm install shift-js
.
…We're on Bower as well: bower install shift-js
.
Shift requires the adding of an attribute to each checkbox to specify its group. With this you can specify unique groups for your collection of checkboxes – allowing you to have multiple checkbox collections per page.
<input type="checkbox" data-shift-group="groupOne" />
<input type="checkbox" data-shift-group="groupOne" />
<input type="checkbox" data-shift-group="groupOne" />
<input type="checkbox" data-shift-group="groupTwo" />
<input type="checkbox" data-shift-group="groupTwo" />
<input type="checkbox" data-shift-group="groupTwo" />
Setting up two unique groups (groupOne
and groupTwo
) allows both to act independently of one another. If you intersperse the checkboxes then it tends to make more sense – because checkboxes of another group will be let well alone.
Once you've setup your DOM there is nothing else to do – Shift will setup the behaviour automatically!
FAQs
Use the shift key to select a range of elements, such as checkboxes and radio buttons.
The npm package shift-js receives a total of 7 weekly downloads. As such, shift-js popularity was classified as not popular.
We found that shift-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.