Answers for "jquery select option search by text"

2

jquery select option by text

$("#myDropdown option:contains(Option 2)").attr('selected', 'selected');
Posted by: Guest on June-16-2020
-1

jquery search select option by text

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
Posted by: Guest on February-19-2021

Code answers related to "jquery select option search by text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language