[Solved] jQuery, getting “500 Internal Server Error” when running a jQuery statement
In order to achieve what you want this will do the job: <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”></script> <script> $(document).ready(function() { $(‘#myButton’).on(‘click’,function(){ alert(“i clicked it”); }); }); </script> </head> <body> <button id=”myButton”>Click Me!</button> </body> </html> $(document).ready is used to execute your code just after your page is rendered, then $(‘myButton’) will get any element with an id … Read more