Hi,
Hoping someone can help. I'm using a datepicker in my forms (sorry, site not live yet).
I've added some custom jQuery UI config stuff to skip weekends, holidays, etc, but am getting an error on non-datepicker-containing pages because it's looking for jQuery.datepicker.NoWeekends. That's just not loaded on pages where there is no datepicker, so it kicks out an undefined error.
I've tried testing if the datepicker function exists, but that didn't work - I'm guessing that might be because the jquery ui bits are loaded by AJAX so aren't in the DOM when the document.ready functions run.
I know this is a little wide of being strictly a GF issue, but would really appreciate any pointers as to how I can detect when I need to load my custom JS code, so that I can beat this error.
Thanks in advance,
divydovy