Passing two functions to a jQuery method