I'm using nyromodal, and having trouble giving the pop-up window a fixed position relative to the background. I.e. I have positioned it where I want it to go, but when the browser window is resized the pop-up shifts in relation to the background page content. I understand this is a feature of nyromodal, but I'd quite like to turn it off. I can't find a function in the docs to do that. Does anyone have any ideas?
CSS snippet:
.nyroModalCont {
position: absolute;
margin:20px 25px 25px 25px;
background:#000;
}
Trigger:
echo '<a href="showimage.php?id='.$row['id'].'" class="trigger" rel="gal">';
echo '<img src="'.$this->ImageDir.$row['id'].'/thumb/'.$row['thumb'].'" border="0" />';
echo '</a>';
Thanks, HR
To avoid shifting (and resizing) of a pop-up after you resize the browser window, you can overwrite the resize
function (with no code inside) into the nyroModal options:
$('.trigger').nyroModal({
resize: function(recalc) {},
});
As alternative (or adding), according to your needs, you can change css properties using nyroModal callbacks that deal with resizing:
$('.trigger').nyroModal({
callbacks: {
beforeResize: function(nm) {
},
afterResize: function(nm) {
}
}
});