Attention: This MooTools Page isn't maintained, please check out the GitHub repository!
Create beautiful, functional and extensive (Multi) Select Fields with pure, vanilla JavaScript or use the MooTools or jQuery bindings!
// Vanilla JavaScript document.addEventListener("DOMContentLoaded", function(){ var options = { /* Your Options */ }; // Just use an CSS Selector... tail.writer(".my-tail-editor", options); // ... or an Element tail.writer(document.getElementById("tail-editor"), options); }); // MooTools Edition window.addEvent("domready", function(){ var options = { /* Your Options */ }; // Single Selector $("my-textarea").tailWriter(options); // Multi Selector $$("my-textareas").tailWriter(options); }); // jQuery Edition jQuery(document).ready(function(){ var options = { /* Your Options */ }; // The known jQuery method jQuery(".my-tail-editor").tailWriter(options); });
Just download the archive and include the js/tail.select(.min).js script as well as the css/tail.select.css stylesheet into your HTML document.
<link type="text/css" rel="stylesheet" href="css/tail.select.css" /> <script type="text/javascript" src="js/tail.select.min.js"></script>
npm -i tail.select
https://cdn.jsdelivr.net/npm/tail.select@latest/css/tail.select.css
https://cdn.jsdelivr.net/npm/tail.select@latest/js/tail.select.min.js
https://unpkg.com/tail.select/css/tail.select.css
https://unpkg.com/tail.select/js/tail.select.min.js
The documentation is still WiP
All options (with the default settings):
$$("select").tailselect({ width: null, height: null, classNames: null, placeholder: null, deselect: false, animate: false, openAbove: null, stayOpen: false, startOpen: false, multiple: false, multiLimit: -1, multiShowCount: true, multiContainer: false, descriptions: false, items: {}, sortItems: false, sortGroups: false, search: false, searchFocus: true, searchMarked: true, hideSelect: true, hideSelected: false, hideDisabled: false, bindSourceSelect: false });
string|int
This options configures the width of the tail.select field as well as for the dropdown field, you
can use 'auto' to detect the current width or null (like the default) to set no width styling at all.
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus