javascript - Missing formal parameter -
im trying load page when clicking on button, in console 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); } }); }); });
you missing "function"
in `$(document).ready. when document ready calls callback function code inside.
$(document).ready(function(){ //your code here });
Comments
Post a Comment