how to open a modal (bootstrap) using jQuery? -


this modal

<div class="modal hide fade" id="loader">                 <div class="modal-dialog">                   <div class="modal-content" style="margin-top:240px;">                       <div class="modal-body">                                <input  type="range" id="loaderd"   min="-50" max="0">                       </div>                        </div>               </div>            </div>   

and jquery

$('#loader').modal('show'); 

the error coming

uncaught typeerror: $(...).modal not function  @ ssss.js:546onclick @ ssss.htm:1 

what's problem? , working button this

<img id="volumeclickedminiplayer" src="img/volume.png"  width="25px" height="25px" data-toggle="modal" data-target="#loader"> 

checout out of points ..

1. first check if have added bootstrap library.

2. if added , check if have include jquery before including bootstrap's javascript.since bootstrap needs jquery.

3. check if included library more once

for example

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>     <script src="/path/to/bootstrap/js/bootstrap.min.js"></script> 

and this:

$(window).load(function() {  jquery.noconflict();     $('#loader').modal('show'); }); 

if not work now.. remove jquery , and bootstrap library , use bootstrap 3.3.5 , jquery 1.11.3.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -