<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Importing html with a script</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.10/handlebars.min.js"></script>
  <script type="text/html" src="sample.html" id="sample"></script>
</head>
<body>
<!--Content of the document......-->
    <div id="containter"></div>
  <script>
    $(function() { // on load
    var t = jQuery('#sample').textContent;
      console.log('t=',t);
    jQuery('#container').html(t);
    });
  </script>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Importing html with a script</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.10/handlebars.min.js"></script>
  <script type="text/html" src="sample.html" id="sample"></script>
</head>
<body>
<!--Content of the document......-->
    <div id="containter"></div>
  <script>
    $(function() { // on load
    var t = jQuery('#sample').text();  // textContent of script
      console.log('t=',t);
    jQuery('#container').html(t);
    });
  </script>

</body>
</html>

Use text() for jQuery text content
Use text()  for jQuery text content