[Solved] Reloading a single div in an html page [closed]


Yes you can use the jQuery function called load().

<script
  src="https://code.jquery.com/jquery-2.2.4.min.js"
  integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  crossorigin="anonymous"></script>

<script>
$( function() {
    $(document).on("click", "#navPanel a", function(){
        var link = $(this).attr('rel');  
        $("#contentPanel").load(link+" #contentPanel > *");
    });
});
</script>

<nav id="navPanel">
   <a rel="link.html">link 1</a>
   <a rel="link.html">link 2</a>
   <a rel="link.html">link 3</a>
</nav>

<div id="contentPanel">
   <p>Content</p>
</div>

4

solved Reloading a single div in an html page [closed]