Is there a way to optimize these four lines into something more efficient?
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"><\/script>')</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script>window.jQuery.ui || document.write('<script src="js/jquery-ui-1.10.3.custom.min.js"><\/script>')</script>
Thanks in advance,
document.write
actually were loaded this way. Thanks a lot for the info. Gave you an upvote. – Ricardo Aug 15 '13 at 2:24