Hi guys!
I'm trying to integrate Admin LTE on a old asp .net website that uses telerik and jquery 1.7.
I'm having some problems.
This is how I included Admin LTE.
<!-- jQuery 2.2.0 -->
<script src="@Url.Content("~/Scripts/AdminLTE-2.3.3/plugins/jQuery/jQuery-2.2.0.min.js")"></script>
<!-- Bootstrap 3.3.6 -->
<script src="@Url.Content("~/Scripts/AdminLTE-2.3.3/bootstrap/js/bootstrap.min.js")"></script>
<!-- Slimscroll -->
<script src="@Url.Content("~/Scripts/AdminLTE-2.3.3/plugins/slimScroll/jquery.slimscroll.min.js")"></script>
<!-- FastClick -->
<script src="@Url.Content("~/Scripts/AdminLTE-2.3.3/plugins/fastclick/fastclick.js")"></script>
<!-- AdminLTE App -->
<script src="@Url.Content("~/Scripts/AdminLTE-2.3.3/dist/js/app.js")"></script>
<script type="text/javascript"> var $jq1 = jQuery.noConflict(true);</script>
And I'm getting the following error:
app.js:154 Uncaught TypeError: Cannot read property 'options' of undefined
Any pointers are welcomed! But please don't tell me to drop jquery 1.7. That is not an option at the moment.
for anyone who's having the same problem, just wrap in a closure the app.js code.
if (typeof jQuery === "undefined") {
throw new Error("AdminLTE requires jQuery");
}
var AdminLTEOptions;
(function ($, jQuery, AdminLTEOptions) {
//// original code goes here
})(jQuery, jQuery, AdminLTEOptions);
Cheers!
Most helpful comment
for anyone who's having the same problem, just wrap in a closure the app.js code.
Cheers!