check for 2 actions user makes on submit

check for 2 actions user makes on submit

Hey everyone.

I have a function that should check if a div is empty and also if a user clicks the submit button at the same time.

If both are true then I want to return an error to him. I just don't know how to define the 2nd variable (var submit) of the click event with Jquery. can you help me with this little puzzle here?