jquery add onclick event dynamically code example Example: set onclick jquery $(elem).click(myFunc());