|
1 | | -# Select.js |
| 1 | +<h1 align="center"> |
| 2 | +Select.js |
| 3 | + |
| 4 | +[](https://twitter.com/intent/tweet?text=Select.js%2C%20a%20free%20JavaScript%select%builder&url=https://github.com/williamtroup/Select.js&hashtags=javascript,html,select) |
| 5 | +[](https://www.npmjs.com/package/jselect.js) |
| 6 | +[](https://www.nuget.org/packages/jSelect.js/) |
| 7 | +[](https://github.com/williamtroup/Select.js/blob/main/LICENSE.txt) |
| 8 | +[](https://github.com/williamtroup/Select.js/discussions) |
| 9 | +[](https://github.com/williamtroup) |
| 10 | +</h1> |
| 11 | + |
| 12 | +> <p align="center">A lightweight, and easy-to-use, JavaScript library for creating multi-select drop-down lists!</p> |
| 13 | +> <p align="center">v0.1.1</p> |
| 14 | +<br /> |
| 15 | +
|
| 16 | + |
| 17 | +<br> |
| 18 | +<br> |
| 19 | + |
| 20 | +<h1>What features does Select.js have?</h1> |
| 21 | + |
| 22 | +- Zero-dependencies and extremely lightweight! |
| 23 | +- Full API available via public functions. |
| 24 | +- Fully styled in CSS/SASS (including the buttons) and compatible with the Bootstrap library. |
| 25 | +- Full CSS theme support (using :root variables, with a default dark-mode theme). |
| 26 | +- Custom triggers for actions (when elements are rendered, selection is changed, etc). |
| 27 | +<br /> |
| 28 | +<br /> |
| 29 | + |
| 30 | +<h1>What browsers are supported?</h1> |
| 31 | + |
| 32 | +All modern browsers (such as Google Chrome, FireFox, and Opera) are fully supported. |
| 33 | +<br> |
| 34 | +<br> |
| 35 | + |
| 36 | +<h1>What are the most recent changes?</h1> |
| 37 | + |
| 38 | +To see a list of all the most recent changes, click [here](docs/CHANGE_LOG.md). |
| 39 | +<br> |
| 40 | +<br> |
| 41 | + |
| 42 | +<h1>How do I get started?</h1> |
| 43 | + |
| 44 | +To get started using Select.js, do the following steps: |
| 45 | +<br> |
| 46 | +<br> |
| 47 | + |
| 48 | +### 1. Prerequisites: |
| 49 | + |
| 50 | +Make sure you include the "DOCTYPE html" tag at the top of your HTML, as follows: |
| 51 | + |
| 52 | +```markdown |
| 53 | +<!DOCTYPE html> |
| 54 | +``` |
| 55 | +<br> |
| 56 | + |
| 57 | +### 2. Include Files: |
| 58 | + |
| 59 | +```markdown |
| 60 | +<link rel="stylesheet" href="dist/select.js.css" /> |
| 61 | +<script src="dist/select.js"></script> |
| 62 | +``` |
| 63 | +<br> |
| 64 | + |
| 65 | +### 3. Create DOM Container: |
| 66 | + |
| 67 | +```markdown |
| 68 | +<select multiple="multiple" data-select-options="{ 'render': true }"> |
| 69 | + <option value="1" selected="selected">Value 1</option> |
| 70 | + <option value="2">Value 2</option> |
| 71 | + <option value="2">Value 3</option> |
| 72 | +</select> |
| 73 | + |
| 74 | +<select data-select-options="{ 'render': true }"> |
| 75 | + <option value="1">Value 1</option> |
| 76 | + <option value="2">Value 2</option> |
| 77 | + <option value="2">Value 3</option> |
| 78 | +</select> |
| 79 | +``` |
| 80 | + |
| 81 | +To see a list of all the available binding options you can use for "data-select-options", click [here](docs/BINDING_OPTIONS.md). |
| 82 | + |
| 83 | +To see a list of all the available custom triggers you can use for "data-select-options", click [here](docs/BINDING_OPTIONS_CUSTOM_TRIGGERS.md). |
| 84 | + |
| 85 | +<br> |
| 86 | + |
| 87 | +### 4. Finishing Up: |
| 88 | + |
| 89 | +That's it! Nice and simple. Please refer to the code if you need more help (fully documented). |
| 90 | +<br> |
| 91 | +<br> |
| 92 | + |
| 93 | +<h1>How do I go about customizing Select.js?</h1> |
| 94 | + |
| 95 | +To customize, and get more out of Select.js, please read through the following documentation. |
| 96 | +<br> |
| 97 | +<br> |
| 98 | + |
| 99 | +### 1. Public Functions: |
| 100 | + |
| 101 | +To see a list of all the public functions available, click [here](docs/PUBLIC_FUNCTIONS.md). |
| 102 | +<br> |
| 103 | +<br> |
| 104 | + |
| 105 | + |
| 106 | +### 2. Configuration: |
| 107 | + |
| 108 | +Configuration options allow you to customize how Select.js will function. You can set them as follows: |
| 109 | + |
| 110 | +```markdown |
| 111 | +<script> |
| 112 | + $select.setConfiguration( { |
| 113 | + safeMode: false |
| 114 | + } ); |
| 115 | +</script> |
| 116 | +``` |
| 117 | + |
| 118 | +To see a list of all the available configuration options you can use, click [here](docs/CONFIGURATION_OPTIONS.md). |
0 commit comments