Select2占位符未显示在移动浏览器中

时间:2019-04-03 07:06:31

标签: javascript jquery html jquery-select2

我想显示选择框占位符,它会显示在桌面浏览器上,而不显示在移动浏览器中。 我找不到问题。

这是我的HTML部分

<div class="col-sm-8 paddingInBoxExtra container">
  <form id="home" action="" method="post" name="viewVisaDetails" onSubmit="return ss_valid()">
    <div class="col-sm-1Third paddingInBox mobPaddingNone">
      <section class="image-panel going">
        <!--<p class="count font24 fontweightNone">1</p>-->
      </section>
      <div class="row alignCenter white font20 paddingBottom marginBottom mobAlignLeft">I am Traveling to</div>
      <div class="row">
            <select class="destinationId" id="destination" name="destinationId">
              <option value="" disabled selected>Select Traveling to</option>
              <option data-prefix="azerbaijan" value="azerbaijan">                Azerbaijan </option>
              <option data-prefix="cambodia" value="cambodia">                Cambodia </option>
              <option data-prefix="egypt" value="egypt">                Egypt </option>
              <option data-prefix="india" value="india">                India </option>
              <option data-prefix="kenya" value="kenya">                Kenya </option>
              <option data-prefix="kuwait" value="kuwait">                Kuwait </option>              
              <option data-prefix="srilanka" value="srilanka">                Sri Lanka </option>
              <option data-prefix="turkey" value="turkey">                Turkey </option>
              <option data-prefix="vietnam" value="vietnam">                Vietnam </option>
            </select>
          </div>
        </select>
      </div>
    </div>
    <div class="col-sm-1Third paddingInBox mobPaddingNone">
      <section class="image-panel from">
        <!--<p class="count font24 fontweightNone">2</p>-->
      </section>
      <div class="row alignCenter white font20 paddingBottom marginBottom mobAlignLeft">I am a Citizen of</div>
      <div class="row">
        <select class="nationality" name="nationality" id="nationality">
          <option value="" disabled selected>Select Your Nationality</option>
        </select>
      </div>
    </div>
    <div class="col-sm-1 mobContainer container">
      <div class="row marginTop mobMarginNone">
        <input id="submit" type="submit" class="row btn-lg primary-btn alignCenter marginBottomNone font28 titleFont" value="GO" />
      </div>
    </div>
  </form>
  <div class="overlay" style="display:none;"> <img src="<?= base_url(); ?>cassets/images/loader.gif" width="32" height="32" class="loader" alt="loader" title="Loader" /> </div>
</div>

现在问题出在台式机浏览器中,占位符显示为“选择您的国籍”,但在移动浏览器中为空白。

0 个答案:

没有答案