I'm encountering an issue with a small script on my HTML page. It's a function that should be triggered by an onclick method in an anchor tag, but it's not working. Every time I click on the link in the browser, the console shows "ReferenceError: $ is not defined" and highlights the third line of the code below.
<script>
function del(urlToDelete) {
$.ajax({
url: urlToDelete,
type: 'DELETE',
success: function(results) {
location.reload();
}
});
}
</script>