I am trying to make an Ajax call work in a click event but it is giving me an error:
$.ajax is not a function
My call:
module.exports.doaction = (Identifier) => {
$(Identifier).modal('show');
$(`${Identifier} a`).click((event) => {
$.ajax({
type: 'POST',
url: '/action',
data: event.target.id
});
});
};
What I am missing?
On my main page the script has been included:
<script src="code.jquery.com/jquery-3.1.1.slim.min.js"></script>