I want to import a whole page with jquery, should I split the page into different jquerys so that I can later write code by jquery means?

-1

With this jquery I'm importing the entire page, but I can not get through html divs in the middle of the query, just in the end

<htmlxmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Getting Started with jQuery</title>
<script src="Scripts/jquery-3.0.0.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#divteste').load('AdminPagina.aspx')
    });
</script>
</head>
<body>
<form id="form1" runat="server">

    <div id="divteste">
        <span>Test inside div</span>
    </div>
</form>
</body>
**texto em negrito**</html>
    
asked by anonymous 23.07.2018 / 12:14

1 answer

0

So, as I said, you already have to bring the import with the correct demarcation made with html and css (I do not know if you are using frameworks like bootstrap ) to position the elements correctly. Then on the page that receives these html already pre-positioned, you can put whatever you want within form which in your case would be the green part of your image. Here's the example:

$(document).ready(function() {
  $('#divteste').load('AdminPagina.aspx')
});
#form1 {
  margin-top: 30px;
  height: 100vh;
  background-color: #999;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><body><divid="divteste">
     <span>Aqui vai vir importado já -> Topnave - Sidenave - Footer</span>
  </div>
  <form id="form1" runat="server">
     <div id="conteudo">
       Aqui vc põe o que vc quiser
     </div>
  </form>
</body>
    
23.07.2018 / 16:25