I've been looking for the answer to this problem for a while. I'm using nyroModal in gallery to show php pages. but the popup doesn't resize the first time it loads. I use this link:

<a href="galtest.php" class="nyroModal cursor" rel="gal"><img src="img/gallery/thumbs/OldMiami.jpg" class="Tips1" title="In the Backyard Of The Old Miami (Detroit, MI)" border="1"></a>`

To call up this php page:

    <style type="text/css">
            p.modal {
            text-align : center;
            }
            p.title {
            font-weight : bold;
            }
            p.caption {
            font-weight : normal;
            }
        </style>
    <?php
    echo '
    <div style="margin:0 auto;">
    <p class="modal title"><strong>Blues by the Bay</strong></p>
    <img src="img/gallery/bbtb32.jpg" title="Blues by the Bay" border="1">
    <p class="modal caption">The Blues By The Bay Festival (Tawas, MI)</p>
    </div>
    ';
    ?>

The first time it loads, it doesn't re-size. After that it does.
I've tried

$(function() {
  $('.nyroModal').nyroModal({
  showCloseButton: false,
  resize: true
});

And

$.nmTop().resize(true);

But it won't resize the first time. I can set the width & height, but since the images are different sizes, that doesn't work too well.

try to include this line at the bottom then post if this works if not ill have a work around :

showCloseButton : false, closeOnClick : false, closeOnEscape : false

You also can try the following:

<script type="text/javascript">
$(document).ready(function(){
 $('.nyroModal').nyroModal({
     showCloseButton:false,   
     closeOnClick: false, /*actually you can remove these two lines */
     closeOnEscape: false, /*because they only disable how to close the window/popup */
 resize: true
} );

});
</script>

this will actually resize your pics when your document is ready.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.