javascript - Modal progress bar breaks my dropdown Menus bootstrap 3.x -



javascript - Modal progress bar breaks my dropdown Menus bootstrap 3.x -

when utilize progress bar in modal, add together @ bottom of html document following:

<script src="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

this works fine, after adding line bootstrap dropdown menus stop working.

if remove script src line above, dropdown menus start working 1 time again modal progress bar doesn't work. modal shown no progress action performed.

progress bar works when in regular page. modal doesn't work.

when utilize inspector of dropdown menu. doesn't perform action when click. no error in js console.

html

<td class="text-center"> <div class="btn-group"><a href="#" data-toggle="dropdown" class="dropdown-toggle"><i class="fa fa-cog"></i></a> <ul class="dropdown-menu pull-right text-left"> <li><a href="#" data-toggle="notify" data-message="collecting device information" data-options="{&quot;status&quot;:&quot;success&quot;, &quot;pos&quot;:&quot;top-right&quot;}">check device status</a> </li> <li><a href="services.html">deploy services</a> </li> </ul> </div> </td>

modal

<!-- modal --> <div class="modal fade" id="getinfomodal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">connecting system...</h4> </div> <div class="modal-body"> <div id="modalprogressbar" class="progress"> <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div> </div> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal -->

javascript

$('#getinfomodal').on('show.bs.modal', function(e) { // introduce delay , close after progress bar finish settimeout(func, 3000); function func() { $('#getinfomodal').modal('hide'); $('#devicestatus').parent().show(); $('.modal-backdrop').remove(); } settimeout(function(){ $('#modalprogressbar').progressbar(100); }, 1000); });

i utilize example: http://codepen.io/bseth99/pen/bmhcf

and same result in drop downwards menus not work after add together bootstrap.min.js.

all scripts included:

<script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.min.js"></script> <!-- plugins--> <script src="vendor/chosen/chosen.jquery.min.js"></script> <script src="vendor/slider/js/bootstrap-slider.js"></script> <script src="vendor/filestyle/bootstrap-filestyle.min.js"></script> <!-- animo--> <script src="vendor/animo/animo.min.js"></script> <!-- sparklines--> <script src="vendor/sparklines/jquery.sparkline.min.js"></script> <!-- slimscroll--> <script src="vendor/slimscroll/jquery.slimscroll.min.js"></script> <!-- store + json--> <script src="vendor/store/store+json2.min.js"></script> <!-- screenfull--> <script src="vendor/screenfull/screenfull.min.js"></script> <!-- app main--> <script src="app/js/app.js"></script> <!-- end page custom script--> <script src="http://code.jquery.com/jquery.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <!-- start page custom script--> <script src="app/js/progressbar.js"></script>

replace line:

<script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.min.js"></script>

with next lines:

<script src="http://code.jquery.com/jquery.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

make sure jquery , bootstrap load before other script depends on it.

javascript jquery html css twitter-bootstrap-3

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -