mediabox responsive

Anne-Pok Dubé <[email protected]>
Newsgroups gmane.comp.web.spip.user
Message-ID <CAFAb__dFpJ0roTXBV6qbt3o71nspmnZeBBjyCb_wncKCHB1d9A@mail.gmail.com>
J'ai trouvé ceci
https://spip.rezo.narkive.com/rAelLYNU/mediabox-et-site-spip-sur-tablette

à ajouter à plugins-dist/mediabox/javascript/spip.mediabox.js
<script>
/* Colorbox resize function */
var resizeTimer;
function resizeColorBox(){
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
if (jQuery('#cboxOverlay').is(':visible')) {
jQuery.colorbox.load(true);
}
}, 300)
}

// Resize Colorbox when resizing window or changing mobile
device orientation
jQuery(window).resize(resizeColorBox);
window.addEventListener("orientationchange", resizeColorBox, false);
</script>

Cela fonctionne mais lorsqu'on est sur un écran d'ordi, cela occupe toute
la page et on n'a plus l'effet de flottement de la mediabox.

Comment puis-je faire autrement?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.