1.0.9 • Published 10 months ago

select-button v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Dropdown menu

This dropdown menu can be used as an alternative for one branch HTML select menu

Basic structure

<div class = "drop-down" values = "..." >
    <input type = "hidden" id = "..." name = "..." >
    <button class = "select" >Select</button>
    <button class = "opt-button" value = "..." >"..."</button>
    -
    -
    -
    -
    <button class = "opt-button" value = "..." >"..."</button>
</div>

JSON file format

Developer should make a json file according to the below format and convert it using js JSON.stringfy() methord before inisialising it as the div element's 'values' attribute.

let info = {
    id: "drop-down-hidden",
    name: "drop-down-hidden",
    values: [
        {
            value: "15478478",
            text: "abc",
        },
        {
            value: "54818787",
            text: "def",
        },
        {
            value: "85255515",
            text: "ghi",
        }
    ]
};

The first two parameters are the hidden field id and name. value in values is an dropdown option's value and text is the text.

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago