Code Monkey home page Code Monkey logo

selectance's Introduction

Selectance

A backend and frontend friendly way to make multiple option selection in your HTML forms built in an easy to use way.

Status GitHub Issues GitHub Pull Requests License

๐Ÿ“ Table of Contents

๐Ÿ” About

Selectance gives you a way to make multiple options selection in HTML form. Here are some reasons you should use it :

  • Easy to use : no JavaScript skill needed,
  • Fast to implement : write the HTML code and let Selectance cares the rest for you,
  • Preselection support,
  • The submited values can be different from the text user sees,
  • Full customisable style.

๐Ÿ Getting Started

Steps to use it :

  1. Download sources from src/main :

    • selectance-script.js the main js script,
    • selectance-style.css a required css file. This file works in pair with selectance-script.js file and is for hidding or showing elements according to the class they are affected by selectance-script. It also apply a basic style to the selector.
  2. Link files :

    Now link the downloaded files to your HTML. The style link can be everywhere but it is important to put the script after all the place you will use the multiselector.

    <link rel="stylesheet" href="path/to/selectance-style.css">
    <script src="path/to/selectance-script.js"></script>
  3. Add class "multiselector" to HTML select elements that needs multiselect.

     <select name="fruits" id="fruits" class="multiselector">
     	<!-- Options -->
     </select>

๐Ÿ’„ Customizing the style

Selectance works by removing the basic select element and uses other generated elements instead. So it can be anoying to customize multiselectors style.

Fortunately, there is a file here that will help you making the customization. In this file you will find the css selectors already writen and indications on the way to use them.

You can use it alone to code yourself all the style or link it after linking the main style (selectance-style.css), to overwrite the main style.

If you want to contribute by sharing you style customization, it will be great!

๐Ÿ”ง Running the tests

To test it, you can download the repository and open test/fruits.html in you browser.

selectance's People

Contributors

jeankouss avatar

Stargazers

seth avatar alban avatar thewisepigeon avatar Yao Maxime KAYI avatar

Watchers

 avatar  avatar

Forkers

cheachhunleang

selectance's Issues

Front-end validation

Selectance need to provide a simple and fast way to make front-end control on the selections like the maximum or minimum number or item user can select.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.