我有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();
});