Web 개발/Java, SpringBoot, JPA
[Jquery] select 관련 플러그인
닉ㄴ네
2021. 9. 14. 17:21
728x90
반응형
1. editable select
<head>
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<link href="jquery.editable-select.min.css" rel="stylesheet">
</head>
$('#basic').editableSelect();
<input type="text" id="basic" class="es-input">
2. multi-select
<!-- Select2 is hosted on both the jsDelivr and cdnjs CDNs. Simply include the following lines of code in the <head> section of your page-->
<head>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
</head>
// In your Javascript (external .js resource or <script> tag)
$(document).ready(function() {
$('.js-example-basic-single').select2();
});
<select class="js-example-basic-single" name="state">
<option value="AL">Alabama</option>
...
<option value="WY">Wyoming</option>
</select>
출처:
https://indrimuska.github.io/jquery-editable-select/
https://select2.org/getting-started/basic-usage
728x90
반응형