Check if Jquery Exist if not load it


/ Published in: jQuery
Save to your folder(s)

If you are working on apps development to adapt on different sites that you don't have access to them, and need to load Jquery, but don't wanna load it twice this will help you !


Copy this code and paste it in your HTML
  1. if (typeof jQuery == 'undefined') {
  2. <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  3. <script type="text/javascript">
  4. google.load("jquery", "1.4.2");
  5. </script>
  6. }

URL: http://www.plan-zero.org

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.