Uncaught TypeError: onClick is not a function code example
Example 1: Uncaught ReferenceError: function is not defined at HTMLUnknownElement.onclick
//Your program can't find the function so do this.
//You can assign the button onclick as an id.
//then attach an eventListener on run time like this:
<button id="btn">Click me!</button>
var btn = document.getElementById("btn");
btn.addEventListener("click", function() {
//Do something here
}, false);
Example 2: Uncaught TypeError is not a function JavaScript
jQuery(document).ready(function($){
// jQuery code is in here
});