diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index be7d32b..1c346bd 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -56,7 +56,12 @@ jQuery(function () { let width = $(this).data('width'); if (width !== undefined) { data.width = width; + let valeur_reduite = ($(window).width() * width) / 100; + url += '&largeur=' + valeur_reduite + 'px'; } + data.onShow = () => { + jQuery.getScript('local/mon_site.js'); + }; $.modalbox(url, data); }); diff --git a/js/gamutable.js b/js/gamutable.js index e4141c7..2c3457d 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -89,8 +89,14 @@ jQuery(function () { if (width !== undefined) { data.width = width; + var valeur_reduite = $(window).width() * width / 100; + url += '&largeur=' + valeur_reduite + 'px'; } + data.onShow = function () { + jQuery.getScript('local/mon_site.js'); + }; + $.modalbox(url, data); }); // lancement d'une médiabox