Trying to load the page content using the JQuery load()
method. See below for the code snippet:
$(window).ready(function() {
$('#content').load('views/login.html');
});
.mdl-layout {
align-items: center;
justify-content: center;
}
.mdl-layout__content {
padding: 24px;
flex: none;
}
<link href="https://code.getmdl.io/1.3.0/material.indigo-blue.min.css" rel="stylesheet" />
<script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="mdl-layout mdl-js-layout mdl-color--grey-100">
<main class="mdl-layout__content" id="content">
</main>
</div>
(Unfortunately, unable to show the login.html in the snippet editor as it is a form powered by the mdl framework:/)
The Javascript functions for the form element from mdl are not working correctly after loading. Despite no errors in the developer console, I have even tried reloading all my javascript files after the load request by jquery?
Any insights on what could be causing this issue with the script?