JavaScript How can I put an input in the top of select tag for searching?

I'm trying to make an advanced <select> tag but implementing an input before the first <option> attribute for searching. Something like this:

enter image description here

Here is my code. How can I add <input name="search_category" class="search" /> to my code?

select {
  width: 50%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<select size="1" class="selection">
    <option>Social</option>
    <option>Political</option>
    <option>Cultural</option>
    <option>Athletic</option>
    <option>Other</option>
</select>
Answer:1

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_elem_datalist

This should solve it, if I understood the question correct.

Answer:2

Have you tried the jquery select2 ?

https://select2.github.io/

I think it will easily solve your problem :)

Answer:3

Not Jquery, but you can use datalist

<style>
input
{
font-size:1.5em; 
}
</style>

<input type="text" placeholder="Select" name="cat" list="cat">
<datalist id="cat">
  <option>Social</option>
    <option>Political</option>
    <option>Cultural</option>
    <option>Athletic</option>
    <option>Other</option>
</datalist>
Answer:4

You can use select2 jquery plugin method to implement dropdown with search functionality.

Here the link with the example.

Hope this one is helpfull.

Answer:5

I'm using angularjs for my application and found this issue on google chrome, the problem is I have this URL: http://127.0.0.1/#/fa/episode/1315019/برنامه-خوب but when I click on this links it shows:...

I'm using angularjs for my application and found this issue on google chrome, the problem is I have this URL: http://127.0.0.1/#/fa/episode/1315019/برنامه-خوب but when I click on this links it shows:...

I am using React/Redux for my web-app and I have the Description Class where user can edit description. Props description and propertyTypes are coming from AJAX calls. import React, { PropTypes } ...

I am using React/Redux for my web-app and I have the Description Class where user can edit description. Props description and propertyTypes are coming from AJAX calls. import React, { PropTypes } ...

  1. update nested value javascript
  2. mongodb update nested value
  3. jq update nested value
  4. redux update nested value
  5. update nested value
  6. python json update nested value
  7. react state update nested value
  8. python dictionary update nested value
  9. update value in nested list c#
  10. update value of nested dictionary
  11. update value in nested dict python

I know, the title isn't really specific, but I have a problem with DatePicker. I try to disable the national days, weekend and 48 hours after today. For the moment I did this : Hide today + 48hours, ...

I know, the title isn't really specific, but I have a problem with DatePicker. I try to disable the national days, weekend and 48 hours after today. For the moment I did this : Hide today + 48hours, ...

  1. jquery datepicker disable national holidays

I have written this script that shows a div when a checkbox is ticked: <cfinput type="Checkbox" name="Agency" value="Agency" id="Agency">Agency Team<br> <div id="agcyTeam" style="...

I have written this script that shows a div when a checkbox is ticked: <cfinput type="Checkbox" name="Agency" value="Agency" id="Agency">Agency Team<br> <div id="agcyTeam" style="...