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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -