So far I have only been able to get the cdn working on both the cms and pages
public function init() {
parent::init();
// Stop Silverstripe from loading it's own version of jQuery.
Requirements::block(SAPPHIRE_DIR .'/thirdparty/jquery/jquery.js');
// Require the CDN version
Requirements::javascript("//cdn.jsdelivr.net/jquery/1.7.2/jquery.min.js");
}
I was wondering if anyone could shed some light on a tidy fallback code for this,
http://www.meerware.com/thoughts/2013/06/cdn-javascript-with-silverstripe/
The comment by Bauke doesn't seem to be working and I am a bit stumped on using Requirements::customScript to achieve what I want. Basically just want something there in the unlikely event that the cdn fails.
Any help would be much appreciated :)