bootstrap选择不在jquery pep中工作

时间:2016-05-03 14:12:25

标签: javascript jquery css twitter-bootstrap

我正在使用bootstrap select和插件jquery.pep.js 问题是,选择选项无法打开或我无法选择选项。

这是代码

<div id="parent">
  <div class="pep peppable">
    <form>
      <div class="form-group">
        <label for="exampleInputEmail1">Email address</label>
        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
      </div>
      <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
      </div>

      <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <select class="form-control">
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
        </select>
      </div>


    </form>

  </div>

</div>

js code

$(document).ready(function(){
        $('.peppable').pep({  constrainTo: 'parent' });

      });

请参阅Demo

1 个答案:

答案 0 :(得分:3)

Read this usage shouldPreventDefault

这是fiddle