use click function in jquery with this id code example Example: set onclick jquery $(elem).click(myFunc());