So im trying to write some script for a modal that im using on my site. And I applied this script in the header which is needed for it to function and this is the error I get in the search console:
Uncaught SyntaxError: Unexpected token (
this is my code:
<script>
function() {
$("#modal").on("show.bs.modal", function(e) {
var link = $(e.relatedTarget);
$(this).find(".modal-body").load(link.attr("href"));
});
};
</script>
It looks fine to me... what could I be doing wrong?