Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
− | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | |||
(function() { | (function() { | ||
Rivi 22: | Rivi 20: | ||
if ( typeof window.jwobschart == 'undefined' ) { | if ( typeof window.jwobschart == 'undefined' ) { | ||
− | window.jwobschart = { | + | window.jwobschart = {}; |
css_link = jQuery( "<link>", { rel: "stylesheet", type: "text/css", href: "//www.jarviwiki.fi/embed/css/obschart.css?ver=1" }); | css_link = jQuery( "<link>", { rel: "stylesheet", type: "text/css", href: "//www.jarviwiki.fi/embed/css/obschart.css?ver=1" }); | ||
Rivi 49: | Rivi 47: | ||
window.jwobschart[id] = {}; | window.jwobschart[id] = {}; | ||
− | + | ||
− | var memo = {}; | + | var memo = {}; |
memo.widgetEl = jQuery( this ); | memo.widgetEl = jQuery( this ); | ||
Rivi 1 404: | Rivi 1 402: | ||
}); | }); | ||
+ | jQuery( window ).resize(function() { | ||
+ | console.log( 'resize triggered' ); | ||
+ | doResize( memo ); | ||
+ | }); | ||
} else { | } else { | ||
Rivi 1 414: | Rivi 1 416: | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
function doResize( memo ) { | function doResize( memo ) { |