Skip to content

therion86/selectable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selectable

A JS selector. The selector appends the styling of the select-field. If you are using for e.g. bootstrap, the wrapper for the select-field looks like a form-control

Requirements

Fontawesome 5

Examples

http://selectable.nightshift-alternativ.de

Usage

Include the source

<script src="selectable/js/Selectable.js"></script>
<link rel="stylesheet" href="selectable/css/main.css" />

Add class to select field

 <select class="selectable">

Further options

Select Attribute Description
title Sets the placeholder text.
data-multiple-options-count Sets the counting value for select "multiple"

Plugins

Selectable external Option Loading

Include Source before Selectable.js

<script src="selectable/js/SelectableExternalOptions.js"></script>

Add class and url to select field

 <select class="selectable external" data-url="url-to-json">

Response of Url

The Response fo the requested Url must a JSON-Array with objects having a "value" and "label" attribute. They will be matched to the options

Searchbar for options

Include Source before Selectable.js

<script src="selectable/js/SelectableSearch.js"></script>

Combine SelectableSearch with SelectableExternalOptions (Live-Search)

 <select class="selectable external live-search" data-url="url-to-json">

About

JS selector

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published