-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
  • 19,651
  • 3
  • 32
  • 72
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
  • 73,242
  • 9
  • 90
  • 149
0

Simple is that:

if (typeof jQuery == 'undefined') {  
    // jQuery is not loaded
} else {
    // jQuery is loaded
}
Rafael Mor
  • 526
  • 5
  • 19