jQuery-ui可选div和开放模态

时间:2017-03-24 12:16:51

标签: javascript jquery html css jquery-ui-selectable

我有div,对于select div我使用了jquery-ui selectable,我想点击div(点击div绘图)并打开模态。

HTML

<div class="content">
  <div id="selectable" class="right-content">
    <div id="selectable" class="clickable row">
      <div class="col-lg-1 table-bordered">1</div>
      <br/><br/>
      <div class="col-lg-2 table-bordered">2</div>
      <br/><br/>
      <div class="col-lg-2 table-bordered">3</div>
      <br/><br/>
      <div class="col-lg-2 table-bordered">4</div>
      <br/><br/>
      <div class="col-lg-2 table-bordered">5</div>
      <br/><br/>
      <div class="col-lg-1 table-bordered">6</div>
    </div>
    <div id="orderModal" class="modal hide fade" role="dialog" aria-labelledby="orderModalLabel" aria-hidden="true">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
        <h3>Order</h3>
      </div>
      <div id="orderDetails" class="modal-body"></div>
      <div id="orderItems" class="modal-body"></div>
      <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
      </div>
    </div>
  </div>
</div>

的JavaScript

 $( function() {
    $("#selectable").selectable();
 });

0 个答案:

没有答案