Jquery Chosen dropdown search based on Id of text?

1.5k views Asked by At

I have used Chosen dropdown successfully code here

I want to search the text in dropdown based on there Id also.

like in below example

         <select chosen data-placeholder="Select Country" class="chosen-select" id="txtcontry" 
         ng-options="country.Id as country.Name for countryName in CountryNames" ng-model="country.Id">
            <option value="Select Country"></option>
        </select>

And I get my like like below enter image description here

Now every country Name has a Id associated with it. So I want to search by name as well as Id also.

For example If country name is United States and its Id is 100 then If I put 100 then it should show me United States as output.

0

There are 0 answers