Check if a Javascript function exists
1 Comment » 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:
if(typeof window.Function == 'function') { // function exists Function(); }