Hi, I'm using the datepicker widget on a site, but there may be pages where the script is not called in the head, where there's no datepicker needed on the page. (To save download time and to reduce execution time)
the $(document).ready function will include a $('.invokeBoth').datepicker( ... ); but this will be called on every page on the site - even those where the datepicker script isn't called within the head. How do I check that datepicker is a function? I was thinking if(typeof datepicker=='function'){ ... } Is this even an intelligent way of attacking the problem of only downloading the function when it's needed? -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/blog