Ero sivun ”Widget:Ice break-up graph” versioiden välillä
Järvi-meriwikistä
Rivi 8: | Rivi 8: | ||
var lang = '<!--{$lang|default:fi|escape:'html'}-->'; | var lang = '<!--{$lang|default:fi|escape:'html'}-->'; | ||
var SiteID = '<!--{$SiteID|default:x|escape:'html'}-->'; | var SiteID = '<!--{$SiteID|default:x|escape:'html'}-->'; | ||
− | |||
− | |||
− | |||
− | + | function <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_jQueryTest() { | |
+ | if ( typeof window.jQuery == 'undefined' ) { | ||
+ | setTimeout( function(){ <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_jQueryTest() }, 300); | ||
+ | } else { | ||
+ | google.load('visualization', '1.0', {'packages':['corechart']}); | ||
+ | google.setOnLoadCallback(<!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_func); | ||
+ | } | ||
+ | } | ||
+ | setTimeout( function(){ <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_jQueryTest() }, 300); | ||
+ | function <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_func() { | ||
var searchStr = "action=ask&query="; | var searchStr = "action=ask&query="; | ||
searchStr += "[[Havainto::>0]][[SiteID::" + SiteID + "]]"; | searchStr += "[[Havainto::>0]][[SiteID::" + SiteID + "]]"; |