How do I attach multiple functions with jQuery Ajax content?

How do I attach multiple functions with jQuery Ajax content?

I've got a bunch of functions defined in an external js file like so:

  1. function tabs() {
  2. $(".tabs").tabs();
  3. }

  4. function closeOverlay() {
  5. $(document).on('click','.close',function(event) {
  6. $(".overlay").fadeOut();
  7. });
  8. }

I'm using ajax to load content into my template, and need to load these functions along with it. This loads my content and my tabs function just fine:

  1. $(document).on('click','#invite',function(event) {
  2. $(".overlay").fadeIn();
  3. $(".overlay").load("inc/invite-guests.htm",tabs);
  4. });

But I can't figure out the syntax to load both my tabs function, and my closeOverlay function at the same time. I thought something like this would work, but it doesn't:

  1. $(".overlay").load("inc/invite-guests.htm",tabs,closeOverlay);