How do I access an element inside the header.html file, loaded in the javascript code, using document.getElementById("element") inside the index.js? There is another way of accessing it from the index.js file?
index.html file
<html>
<head>
    <meta charset="utf-8">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script>
        $(function(){
            $("#header").load("header.html");
            $("#footer").load("footer.html");
        });
    </script>
    <script src="https://www.gstatic.com/firebasejs/3.9.0/firebase.js"></script>
    <script src="js/app.js" type="text/javascript" language="javascript"></script>
    <script src="js/index.js" type="text/javascript" language="javascript" defer></script>
</head>
</html>
 
     
     
    