I am using the following to load ads on my site
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> var adWidth = $(document).width(); google_ad_client = "ca-pub-6777348526535979"; if ( adWidth >= 768 ) { google_ad_slot = "3870513647"; google_ad_width = 728; google_ad_height = 90; } else { google_ad_slot = "1127560842"; google_ad_width = 320; google_ad_height = 50; } </script> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script> It works fine but i think i can optimize the ad delivery further.I want to load the jquery asynchronously and thus the following script must wait for the jquery to be loaded.
<script type="text/javascript"> var adWidth = $(document).width(); google_ad_client = "ca-pub-6777348526535979"; if ( adWidth >= 768 ) { google_ad_slot = "3870513647"; google_ad_width = 728; google_ad_height = 90; } else { google_ad_slot = "1127560842"; google_ad_width = 320; google_ad_height = 50; } </script> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script> How can i accomplish this ?