I want to show javascript code which used in the page by javascript without executing the code. I already used .getScript() method, but it executed the script.
Please tell me how to get javascript code without execution and embed to HTML.
html
<html>
<head>
<script src='iwanttoshow.js'></script>
</head>
<body>
<div class="js-source"></div>
</html>
javascript file
$.getScript("/iwanttoshow.js", function(data) {
window.alert("loaded!");
$(".js-source").html(data);
}