fix for click handlers in different versions of jquery