Response title
This is preview!
$(document).on("pageshow", function (e) { var urlup = null, urlleft = null, urlright = null; var owimage; function resim(onload) { var wbutton = 52; $('.ui-page-active img').each(function (i) { s = $(this).attr("src"); if (s.indexOf("buttonleft.png") < 0 && s.indexOf("buttonright.png") < 0 && s.indexOf("buttonup.png") < 0) { wimage = $(this).width(); if (onload) { owimage = wimage; } wviewport = $(window).width(); if ((wviewport - 2 * wbutton) < owimage) { wimage = wviewport - 2 * wbutton; $(this).attr("width", wimage); } } }); } resim(true); $(window).off("resize").on("resize", function () { resim(false); });
$(document).on("pagebeforechange", function (e) { var owimage = new Object(); function resim(ol) { var wbutton = 52; $('img').each(function (idx) { s = $(this).attr("src"); if (s.indexOf("buttonleft.png") < 0 && s.indexOf("buttonright.png") < 0 && s.indexOf("buttonup.png") < 0) { var wimage = $(this).width(); if (!owimage[s] || wimage > owimage[s]) { owimage[s] = wimage; } wviewport = $(window).width(); if ((wviewport - 2 * wbutton) < owimage[s]) { wimage = wviewport - 2 * wbutton; $(this).attr("width", wimage); } } }); } setTimeout(function () { resim(true); $(window).off("resize").on("resize", function () { resim(false); }); }, 100); });
<p style="display: flex; justify-content: center; align-items: center"> <a href="../kakteen/2011-07_Echinopsis_Stars_And_Stripes.php"><img style="flex: 0 0" src="../../images/buttonleft.png" style="border: 0px"></a> <img style="flex: 0 1 auto;" src="2012-05_HWH_Humkes_Roeschen.jpg" alt="Hildewintera-Hybride Humkes Röschen" style="border: 2px solid black; vertical-align:middle"> <a href="../kakteen/2011-04_Rebutia_marsoneri_flowplayer.php"><img style="flex: 0 0" src="../../images/buttonright.png" style="border: 0px"></a> </p>
there are several kinds of meta tags. Which one is relevant for the flex box?
Thanks for your advice. Can you explain what's the effect of this code?You don't have a <meta>. You need a proper <meta> to get the page width set to the device width.
© 2013 jQuery Foundation
Sponsored by and others.