There's a function defined in a JavaScript file:
In myscripts.js:
function myOn(node,event, selector, data, handler)
{
document.write("This text is sourced externally.");
}
Within the HTML file, you'll find:
<body>
<script src="myscripts.js"></script>
...//some text and tags
<script>
myOn(outer, 'click','.deleteButton ', "", deleteDiv);
</script>
<body>
The "myOn" function doesn't seem to be executing in the HTML file.
How can I fix this?
I've looked online but most examples are too complicated for me to grasp.
I need a beginner-friendly example.