How to .js file $ajax code defined '$ not defined error''? : <pre><code>var deneme = document.createElement("SCRIPT");
deneme.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js";
var nodeajax = document.createTextNode("function deneme() {console.log('dawdawdawd');$.ajax({ type: \"POST\", url: \"http://localhost:54371/checkbox.aspx/Check\", data: '{sayfa: 10 }', contentType: \"application/json; charset=utf-8\", dataType: \"json\", success: function (response) { console.log(response.d); alert('sdf'); }, failure: function (response) { console.log(response); } });}"););
deneme.appendChild(nodeajax);
document.body.appendChild(deneme);
</code></pre>

<p>How do I define ajax without using script tag in the .js file?</p>

<p>' $ is not defined.' I get an error.</p>
