Hey is there a way to specify a fallback js just in case loading from the YUI CDN were to fail?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest solution is to check for the existence of the global object/function created by the script. For instance, for jQuery it would be
and YUI I believe is
Then you might want to try injecting the script in some other manner, like
This will create a new
scriptelement in yourheadwith a link to another source of your choice.