I'm trying to import a JavaScript function into my HTML document. It work's on Chrome however in IE11 it returning 'aFunction' is undefined.
I've read numerous help topics but am unable to find a solution yet.
My Code is as follows.
Index.html
<head>...
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var myFunction = aFunction();
//print to console to see if variable has anything in it
console.log(myFunction);
});
</script>
...</head>
test.js
function aFunction(){ //some code... }
Any ideas would be much appreciated.