Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery & Bootstrap not working?

I have recently started using/learning bootstrap and jQuery for my site and while I was searching for ideas. I went across bootstrap dialogs which I thought could help me make my site more modernized. While I was testing code snippets it in the site. There seemed to be no response from jquery at all.

<li id="Login"><a href="#">Login</a></li>

This li tag above is being printed out by php. The code below is placed in the body tags

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

<script>
$(document).ready(function(){
    $("#Login").click(function(){
        BootstrapDialog.show({
        message: 'Hi Apple!'
    });
    });
});
</script>

code samples are very much appreciated if there was an error because I don't really know what I am doing wrong.

EDIT: I forgot to mention that i got the snippets from http://nakupanda.github.io/bootstrap3-dialog/#available-options

like image 684
DeathKing Avatar asked Feb 10 '23 01:02

DeathKing


1 Answers

You have not included bootstrap-dialog.js.

I tried running your code into jsfiddle and it gave me ReferenceError: BootstrapDialog is not defined

you can find bootstrap-dialog-js on nakupanda's github account : https://github.com/nakupanda/bootstrap3-dialog/tree/master/src/js

like image 191
Nilesh Mahajan Avatar answered Feb 12 '23 16:02

Nilesh Mahajan