javascript jquery how to add method call from button click code example Example: set onclick jquery $(elem).click(myFunc());