Home > Featured > fancyBox 2.1.3: Vertical Positioning to the Top
Bookmark and Share

fancyBox 2.1.3: Vertical Positioning to the Top

Posted on December 15, 2012 | Filed in Featured, jQuery

To align the fancyBox viewport to the top just declare the ‘topRatio’ : 0. This will position your photo/gallery to the top of browser window.

Example:

<script type=”text/javascript”>
$(“#springsummergallery”).click(function() {
$.fancybox([
’01.jpg’,
’02.jpg’,
‘etc.jpg’,
], {
‘padding’: 0,
‘transitionIn’: ‘none’,
‘transitionOut’: ‘none’,
‘type’ : ‘image’,
‘changeFade’ : 0,
‘topRatio’ : 0
});
});
</script>

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog