jquery on button click vs javascript on button click code example Example: set onclick jquery $(elem).click(myFunc());