how to write button click event in jquery code example Example: set onclick jquery $(elem).click(myFunc());