Calling a jQuery function from another file

Calling a jQuery function from another file

OK - I didn't think this was going to cause me such big headaches.

I have the following function:

  1. function getTimeStamp() {
  2.        var now = new Date();
  3.        return ((now.getMonth() + 1) + '/' + (now.getDate()) + '/' + now.getFullYear() + " " + now.getHours() + ':'
  4.                      + ((now.getMinutes() < 10) ? ("0" + now.getMinutes()) : (now.getMinutes())) + ':' + ((now.getSeconds() < 10) ? ("0" + now
  5.                      .getSeconds()) : (now.getSeconds())));
  6. }
Until this morning - the function resided in a page I was developing, and when I called it I got the desired results.

But - since I will want to use timestamps on other pages as well - I decided to put this function in a custom.function.js file and call it from there. I included the file in my <head></head> section. I'm calling the function the same way I always have ...

  1.     $("#findTime").click(function() {
  2.     var tmStamp = getTimeStamp();
  3.         console.log("inside click: " + tmStamp);
  4.     });
But now - I'm not getting ANYTHING returned. Do I have to call the function differently when I move it from the content page to custom functions file?

Thanks in advance - Pavilion