user3703527
user3703527

Reputation:

why alert is not display in angular using twitter bootstrap?

can you please tell me why my alert is not display .I am using bootbox.js plugin(http://bootboxjs.com/v3.x/) .but it is not display my alert as given in site ?

here is my code..

http://jsbin.com/kopalire/1/

HTML

<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

      <script src="https://dl.dropboxusercontent.com/s/8nlfxc5zh58uf9o/bootbox.min.js?m="></script>



  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
 <button id="clikId">add</button>


</body>
</html>

JS CODE

$(function () {


 // Code goes here
    $(document).ready(function(){
        $('#clikId').click(function(){
            bootbox.alert('Hello alert')
        })
    })


});

BUT when I change bootstrap 3.2 to 2.3 it works why ? if i include this it works why ?

<script src="//code.jquery.com/jquery.min.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>

Upvotes: 0

Views: 78

Answers (1)

aze&#243;s
aze&#243;s

Reputation: 4901

You are using Bootbox v3.3.0, which is not compatible with Bootstrap 3. Take a look at the Bootbox's dependencies table: http://bootboxjs.com/#dependencies

I tried your JS Bin example with Bootbox v4.3.0 and Bootstrap v3.2.0 and it works just fine: http://jsbin.com/kopalire/3/edit

Upvotes: 1

Related Questions