-1

I am using

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

Google sites has been blocked in some of my client's office systems, so they can't able to view my site. How can I know whether file loaded or not? If not download I have to use .js file which stored in my server... Is it possible..

MonkeyZeus
  • 20,375
  • 4
  • 36
  • 77
user1777733
  • 15
  • 1
  • 6

2 Answers2

1

Use that:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
     window.jQuery || document.write('<script src="myLocalPath/jquery.min.js"><\/script>');
</script>
A. Wolff
  • 74,033
  • 9
  • 94
  • 155
0

Simple is that:

if (typeof jQuery == 'undefined') {  
    // jQuery is not loaded
} else {
    // jQuery is loaded
}
Rafael Mor
  • 626
  • 1
  • 7
  • 21