简体   繁体   中英

Bind Selectric jQuery Dropdown excluding option selected

I am using selectric jQuery dropdown in my webdesign:

<select id="RemoveReason">
    <option value="0">Reason for Disconnect</option>
    <option>Coverage</option>
    <option>Price</option>
    <option>Customer experience</option>
    <option>Serviceability</option>
    <option>Promotion</option>
    <option>Limited Device range</option>
</select>

With this I am getting the value at 0 position again in the select dropdown upon default select. You can find an image here

Can anyone help me to solve this problem? Thanks in advance.

Add selected and disabled , I believe this is what you expected.

 <select id="RemoveReason">
  <option value="0" selected disabled>Reason for Disconnect</option>
  <option>Coverage</option>
  <option>Price</option>
  <option>Customer experience</option>
  <option>Serviceability</option>
  <option>Promotion</option>
  <option>Limited Device range</option></select>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM