modalbox, on charge mon_site.js

This commit is contained in:
Christophe 2021-04-19 23:30:19 +02:00
parent eda75c38db
commit d82f0b9e0e
2 changed files with 11 additions and 0 deletions

View file

@ -56,7 +56,12 @@ jQuery(function () {
let width = $(this).data('width'); let width = $(this).data('width');
if (width !== undefined) { if (width !== undefined) {
data.width = width; 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); $.modalbox(url, data);
}); });

View file

@ -89,8 +89,14 @@ jQuery(function () {
if (width !== undefined) { if (width !== undefined) {
data.width = width; 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); $.modalbox(url, data);
}); // lancement d'une médiabox }); // lancement d'une médiabox