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