Select2
How do I make an select2?
What is a select2? How do you make a select2? This script and codes were developed by Tom Markart on 31 January 2023, Tuesday.
Select2 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Select2</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://select2.github.io/dist/css/select2.min.css'>
<link rel='stylesheet prefetch' href='https://select2.github.io/css/font-awesome.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <br /><br />
<div class="container"> <form> <h4> Basic </h4> <select class="js-example-basic-single"> <option selected="selected" value=""></option> <option value="01"> A-1 Septic Service Inc. - 12345678910 - <i class="policy-type">Commercial Automobile</i> </option> <option value="02"> Bill Gordon - 37849423435 - Commercial Auto </option> <option value="03"> Bill Thomas - 37849423435 - Commercial Auto </option> <option value="04"> Don Young - 47389045060 - General Liability </option> <option value="05"> Donald Olderman - 44852694256 - General Liability </option> <option value="06"> Edgar Martinez - 13579246804 - Property </option> <option value="07"> Edgar Martinez - 13579246804 - Workers Comp </option> <option value="08"> Elizabeth Warren - 28340345935 - Workers Comp </option> <option value="09"> Jesus Gonzalez - 12589463285 - Property </option> <option value="10"> Mario Flores - 37849501745 - Workers Comp </option> <option value="11"> Matthew Smith - 80125963215 - Commercial Auto </option> <option value="12"> Matthew Smith - 80125963215 - Workers Comp </option> <option value="13"> Richard Young - 47389045060 - General Liability </option> <option value="14"> Steve Lacina - 85236974125 - Commercial Auto </option> <option value="15"> Tom Chorske - 21389234023 - Commercial Auto </option> <option value="16"> Thomas Foolery - 12003652158 - Commercial Auto </option> <option value="17"> Thomas Kelsey - 12003652158 - Commercial Auto </option> <option value="18"> Tom Markart - 91928050180 - Commercial Auto </option> <option value="19"> Tom Markart - 91928050182 - General Liability </option> <option value="20"> Tom Markart - 91928050184 - Workers Comp </option> </select> <h4> Grouped </h4> <select class="js-example-basic-single"> <option selected="selected" value=""></option> <option value="01"> A-1 Septic Service Inc. - 12345678910 - <i class="policy-type">Commercial Automobile</i> </option> <option value="02"> Bill Gordon - 37849423435 - Commercial Auto </option> <option value="03"> Bill Thomas - 37849423435 - Commercial Auto </option> <option value="04"> Don Young - 47389045060 - General Liability </option> <option value="05"> Donald Olderman - 44852694256 - General Liability </option> <optgroup label="Edgar Martinez"> <option value="06"> Edgar Martinez - 13579246804 - Property </option> <option value="07"> Edgar Martinez - 13579246804 - Workers Comp </option> </optgroup> <option value="08"> Elizabeth Warren - 28340345935 - Workers Comp </option> <option value="09"> Jesus Gonzalez - 12589463285 - Property </option> <option value="10"> Mario Flores - 37849501745 - Workers Comp </option> <optgroup label="Matthew Smith"> <option value="11"> Matthew Smith - 80125963215 - Commercial Auto </option> <option value="12"> Matthew Smith - 80125963215 - Workers Comp </option> </optgroup> <option value="13"> Richard Young - 47389045060 - General Liability </option> <option value="14"> Steve Lacina - 85236974125 - Commercial Auto </option> <option value="15"> Tom Chorske - 21389234023 - Commercial Auto </option> <option value="16"> Thomas Foolery - 12003652158 - Commercial Auto </option> <option value="17"> Thomas Kelsey - 12003652158 - Commercial Auto </option> <optgroup label="Tom Markart"> <option value="18"> Tom Markart - 91928050180 - Commercial Auto </option> <option value="19"> Tom Markart - 91928050182 - General Liability </option> <option value="20"> Tom Markart - 91928050184 - Workers Comp </option> </optgroup></select> </form>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://select2.github.io/dist/js/select2.full.js'></script> <script src="js/index.js"></script>
</body>
</html>
Select2 - Script Codes CSS Codes
.select2-container { width: 75%;
}
.policy-type { color: #ccc;
}
Select2 - Script Codes JS Codes
//https://select2.github.io/examples.html
$(document).ready(function() { $(".js-example-basic-single").select2({ placeholder: "Filter Available Policies", width: "style" // Copies the value of the width style attribute set on the source element });
});
![Select2 - Script Codes](http://shots.codepen.io/tmarkart/pen/mMymEp-512.jpg)
Developer | Tom Markart |
Username | tmarkart |
Uploaded | January 31, 2023 |
Rating | 3 |
Size | 3,383 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Election static page | 5,563 Kb |
MPP Contact Us | 8,887 Kb |
Story Card Expand Details | 4,759 Kb |
Election Widget | 6,152 Kb |
BMIC - Claim Form UI | 8,073 Kb |
CSS truncation with ellipsis | 2,295 Kb |
Story Detail 0.5 | 15,495 Kb |
Responsive nav | 5,123 Kb |
Story Detail 1.0 - related content - asset types - aspect ratio | 14,515 Kb |
Story Detail 1.0 - related content - no images | 13,623 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Slider for stackoverflow | KKOKU | 3,222 Kb |
Shape Outside - Polygon | Stacy | 3,954 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
Popover Example | Seanboom | 2,429 Kb |
Mobile Sub Menu Concept | Berdejitendra | 2,790 Kb |
Konami Code Easter Egg | Teolitto | 3,051 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Simple checkbox style | Vncnz | 2,628 Kb |
Super Discount | Orrinward | 3,225 Kb |
Resume | Rottingroom | 5,483 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!