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);        }     }); }); }); 

im using https://code.jquery.com/jquery-3.2.1.slim.min.js

you missing "function" in `$(document).ready. when document ready calls callback function code inside.

$(document).ready(function(){      //your code here }); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -