Skip to content

gunabalans/select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

select

A simple select box for html forms with select and search, this may be used as select2 alternative.

Example

Add css

<link rel="stylesheet" href="../dist/css/select.css" />

Actual selet box html code

<div class="selectBox">
          <input id="nklist" type="text" class="selectInput" tabindex="1" />
          <div class="selectedList" id="listid">
            <ul tabindex="2">
              <li value="Algeria">Algeria</li>
              <li value="American Samoa">American Samoa</li>
              <li value="Andorra">Andorra</li>
              <li value="Angola">Angola</li>
            </ul>
          </div>
    </div>

Load script at the footer

<script src="../dist/js/select.js"></script>

Call the script to start select box

<script>
      Nk.start({
        selectboxid: "#nklist",
        selectListid: "#listid",
        placeholder: "Select ..",
        maxHeight: "150px",
      });
</script>

screenshot

image

About

A simple select box for html forms

Resources

License

Stars

Watchers

Forks

Packages

No packages published