Im trying to load a page when someone is clicking on a button, but In my console already it prints:
missing formal paramter script.js:2:6
$(document).ready({
$("[data-action='openModal']").on("click", function(evt) {
evt.preventDefault();
var $object = $(this);
$.ajax($object.attr("href"), {
success: function(data) {
$("body").append(data);
}
});
});
});
Im using https://code.jquery.com/jquery-3.2.1.slim.min.js
You missing "function" in `$(document).ready. When document is ready it calls callback function with your code inside.
$(document).ready(function(){
//Your code here
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With