Check for clicks only when not called by ajax