my side bar is not working.
because
Uncaught TypeError: undefined is not a function sb-admin-2.js:3(anonymous function) sb-admin-2.js:3j jquery.js:3094k.fireWith jquery.js:3206n.extend.ready jquery.js:3412I jquery.js:3428
Uncaught TypeError: undefined is not a function (index):679(anonymous function) (index):679fire jquery.js:974self.fireWith jquery.js:1084jQuery.extend.ready jquery.js:406DOMContentLoaded
I think that In sb-admin-2.js,
$(function() {
$('#side-menu').metisMenu();
});
is not working and Uncaught TypeError: undefined is not a function
I hope... I will be helped...
Make sure you have loaded jquery first, then sb-admin-2.js. Also make sure you only load them once.
I had the same problem and found that I had accidentally loaded both jquery and sb-admin-2.js twice, once directly with a tag and once as part of a bundle of multiple javascript files. I think loading jquery twice was the culprit in my case.
Call Metis after the view is initialised and also Make sure you have the ordered your JS libraries in correct order. For me the sequence is as follows:
<script src="/js/jquery.js"></script>
<script src="/js/jquery.3.1.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="/assets/global/plugins/select2/js/select2.js" type="text/javascript"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With