jquery - Nestable tree does not work in a modal ui- bootstrap using the < script> < / script> -


i try display tree in modal nestable ui- bootstrap , select - + not pop , not work when injected between ui modal -bootstrap ( jquery.nestable.js ) how can solve problem !

<script type="text/ng-template" id="mymodalcontent.html">     <div class="dd" id="nestable">         <ol class="dd-list">             <li class="dd-item" class="dd-item" data-id="1">                 <div class="dd-handle">entretien</div>                 <ol class="dd-list">                     <li class="dd-item" data-id="1">                         <div class="dd-handle"  ng-click="setselectedsegment(valsegment)">lessives</div>                     </li>                     <li class="dd-item" data-id="1">                         <div class="dd-handle"  ng-click="setselectedsegment(valsegment)">ffi</div>                     </li>                     <li class="dd-item" data-id="1"> <div class="dd-handle"  ng-click="setselectedsegment(valsegment)">hdw</div></li>                     <li class="dd-item" data-id="1"> <div class="dd-handle"  ng-click="setselectedsegment(valsegment)">adw</div></li>                     <li class="dd-item" data-id="1"> <div class="dd-handle"  ng-click="setselectedsegment(valsegment)">produits wc</div></li>                 </ol>             </li>         </ol>     </div> </script> <button  class="safe btn btn-default btn-white btn-segmentation" ng-click="open()">{{ selectedtree ? selectedtree : 'segmentation' }}</button> 

what have seen of time when events not firing correctly in modal window, it's because modal creating elements needed present on pageload in order bound correctly. easy way fix fire nestable.js when modal triggered, rather on initial page load. of course, many ways solve tends quick , easy fix.

$('#modal-id').on('show.bs.modal', function (e) {   $('.dd').nestable(); }) 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -