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