how to add function onlock to a using jquery code example Example: set onclick jquery $(elem).click(myFunc());