(05-02-2015, 08:57 PM)zeli Wrote: In the footer:
Code:
<script type="text/javascript">
$(function() {
// Javascript to enable link to tab
var hash = document.location.hash;
if (hash) {
console.log(hash);
$('.nav-stacked a[href='+hash+']').tab('show');
}
// Change hash for page-reload
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
window.location.hash = e.target.hash;
});
});
</script>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="<?php echo site_url('assets/js/jquery-1.10.2.min.js'); ?>"></script>
<script src="<?php echo site_url('assets/js/jquery-migrate-1.2.1.min.js'); ?>"></script>
<script src="<?php echo site_url('assets/js/jquery-ui.js'); ?>"></script>
Since your code requires jQuery, it should be included after all of the jQuery includes, not before them. You're also going to want it to be after any bootstrap scripts.