[Ajax] browser console synchronous error using .load()
Hello community,
I'm new to jquery with some bases and I need your help to solve my problem that takes me a lot of time
Basically, I want a dynamic page where I can load any page on click (I have 2 pages). In practice, all in working fine, up to a certain limit... When I trigger the click one time, I get errors, and with multiple trigger click its even worse and ends with a browser freeze.
Index.html :
- <p class="click-see" href="inc/print.html">Enter</p> // When I click for example here
- <section id="dynamic"></section> // Load its href in this section
Here is the loaded page inc/print.html which contain the back button :
as you can see I had to link affected scripts
to make them work
- <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div id="dynamic-print"></div>
<div id="box">
<h4 class="box-title"> Content </h4>
</div>
<div class="click-return">Back</div>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/pageload.js"></script>
</body>
</html>
Jquery code :
(with an animation to scroll directly to the loaded content)
- $(document).ready(function() {
$('.click-see').click(function() {
$("#dynamic").load($(this).attr('href')); // Enter button
$('html, body').animate({
scrollTop: $('#dynamic').offset().top
}, 750);
});
$('.click-return').click(function() { // Back button
$('html, body').stop().animate({
scrollTop: 0
}, 500, 'swing');
setTimeout(
function() {
$("#dynamic").empty($(this).attr('href'));
}, 500);
});
});
And errors obtained :
for example I clicked this way :
1 time on "Enter", 1 time on "Back" (x2) and errors occur only when I click on "Enter"

Definitely there is something I'm missing or doing wrong. I hope you can provide me some light about this 
Regards