vendredi 30 janvier 2015

Bootstrap dropdown menu not working in chrome app


I'm using bootstrap in a chrome app and trying to do basic things, like use a dropdown menu. None of the code samples seem to be 'dropping down' after I click on the button. It's just a styled button that seems to have no code triggered off the 'click' event.


Bootstrap version: 3.3.1


jQuery version: 2.1.3


My third-party/css and third-party/js directories seem to have the regular and minified versions of bootstrap. I'm not sure if I can get away with only the .min versions.



<!-- CSS -->
<link href="assets/third-party/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- Single button -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>

<!-- JavaScript -->
<script src="assets/third-party/js/jquery.min.js"></script>
<script src="assets/third-party/js/bootstrap.min.js"></script>
</body>


Edit


I've isolated that things work when index.html is directly opened by a browser, but the sample simple dropdown example does NOT work when opened within a chrome app.


To remove any ambiguity, the example chrome project available on GitHub.





Aucun commentaire:

Enregistrer un commentaire