Here is a trimmed down example of what I am trying to accomplish. I have two pages the parent page (index.html) and the child page (child.html). The child page has multiple children html pages which are dynamically loaded using jQuery inside child page div container based on button click on child.html page, which works fine but what I need to do is to load the children pages in child.html based on parent button clicks in index.html. Can anyone solve this?
index.html
<body>
<div class="container-fluid">
<div class="row">
<ul>
<h1>Main Nav</h1>
<!--When this button is clicked, it opens child.html in a new tab and must load pageone.html inside the #shared-page div of child.html page and the corresponding <li> item in child.html page should be active-->
<li><a href="child/child.html" class="share-one" target="_blank">Page One</a></li>
<!--When this button is clicked, it opens child.html in a new tab and must load pagetwo.html inside the #shared-page div of child.html page and the corresponding <li> item in child.html page should be active -->
<li><a href="child/child.html" class="share-one" target="_blank">Page Two</a></li>
</ul>
</div>
</div>
</body>
child.html
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<ul>
<h1>Left Nav</h1>
<li><button class="share-one" type="button">Page One</button></li>
<li><button class="share-two" type="button">Page Two</button></li>
</ul>
</div>
<div class="col-md-9">
<div id="shared-page"></div>
</div>
</div>
</div>
</body>
jQuery to load shared pages dynamically
$(document).ready(function(){
$(".share-one").on("click",function(){
$("#shared-page").load("https://www.hostnanny.tk/test/shared/shareone.html");
});
$(".share-two").on("click",function(){
$("#shared-page").load("https://www.hostnanny.tk/test/shared/sharetwo.html");
});
});