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

js-select-hd

v1.0.5

Published

[![NPM](https://nodei.co/npm/js-select-hd.png?downloads=true)](https://nodei.co/npm/js-select-hd/)

Downloads

2

Readme

js-select npm Build Status Coverage Status

NPM

The select library uses pure js for everyone. View demo here

Features

  • Super fast
  • Easy to use

Install

Install with javascript

<script src="dist/jsselect.js"></script>

Install with npm

npm install --save js-select-hd

Usage

Js Render

<script src="dist/jsselect.js"></script>
<script>
    const jsselect = new JSSelect('#js-select', [
    {id: 1, name: 'Độ tuổi'},
    {id: 2, name: 'Theo nhóm xe'},
    {id: 3, name: 'Giới tính'},
    {id: 4, name: 'Xe không có thuê bao'},
    {id: 5, name: 'Tiêu chí xe'},
    {id: 6, name: 'Tiêu chí xe 1'},
    {id: 7, name: 'Tiêu chí xe 2'},
    ], {
    placeholder: 'Chọn tiêu chí lọc',
    typing: 'Tìm kiếm tiêu chí lọc...',
    search: false, // Can select null value
    canNull: false, // Can select null value
    maxRow: 5 // Max value show
});

    jsselect.onSelected((item) => {
    console.log('Selected:', item);
    console.log('Selected ID:', jsselect.value);
})
</script>

Html Render

<select style="width: 325px;" class="js-select" name="select-x"
        data-jsSelect="true"
        data-placeholder="Chọn tiêu chí lọc"
        data-search="true"
        data-canNull="true"
        data-maxRow="6"
        data-typing="Tìm kiếm tiêu chí lọc...">
    <option value="1">Độ tuổi</option>
    <option value="2">Theo nhóm xe</option>
    <option value="3">Giới tính</option>
    <option value="4">Xe không có thuê bao</option>
    <option selected value="5">Tiêu chí xe</option>
    <option value="6">Tiêu chí xe 1</option>
    <option value="7">Tiêu chí xe 2</option>
</select>
<script src="dist/jsselect.js"></script>

Constructors

JSSelect(textDom, arrayData, options)

options.placeholder

Type: String
Default: ""

options.typing

Type: String
Default: ""

Events

onSelected(callback)

Method

setValue(value)

Contributing

See the CONTRIBUTING Guidelines

License

MIT © HoangDaiCntt