Check if a Javascript function exists
by Jon Hibbins on 22 March 2009
Filed under: Code, Javascript, Quick Tips
If you want to check if a Javascript function exists before you attempt to call it and get an error try:
// Check if a Javascript function exists and run it if it does if(typeof window.Function == 'function') { Function(); }
June 11th, 2009 at 8:37 am
Thanks for the useful info. It’s so interesting