Hi,

I had to change the fancybox default width and height in js/jquery.fancybox.js to get it to work better with Firefox on my Mac:

$.fn.fancybox.defaults = {
hideOnContentClick: false,
zoomSpeedIn: 500,
zoomSpeedOut: 500,
frameWidth: 800,
frameHeight: 600,
overlayShow: false,
overlayOpacity: 0.4,
itemLoadCallback: null
};

CommentFileSizeAuthor
#2 fancybox-mac.js_.patch669 byteslopolencastredealmeida

Comments

lopolencastredealmeida’s picture

Assigned: Unassigned » lopolencastredealmeida

Thanks for your work. JQuery FancyBox doesn't work so well as the original FancyBox but I didn't wish to add another JS library to make it work.

If you could add a patch here it would be nice.

lopolencastredealmeida’s picture

Status: Active » Closed (fixed)
StatusFileSize
new669 bytes

I made the patch by your request but it really wont need to exist and you shouldn't had the need to change anything in the jQuery plugin to achieve this. Defaults are modifiable in the theme files and don't require a modification in the jQuery plugin.

Locate in page.tpl.php:

    <script type="text/javascript">
           $(document).ready(function() {
                  //Activate FancyBox
                  $("a#custom_3").fancybox({
                         'zoomSpeedIn': 0, 
                         'zoomSpeedOut': 0
                  });
           });
    </script>

and change it by the following:

    <script type="text/javascript">
           $(document).ready(function() {
                  //Activate FancyBox
                  $("a#custom_3").fancybox({
                         'zoomSpeedIn': 0, 
                         'zoomSpeedOut': 0,
                         'frameWidth': 800,
                         'frameHeight': 600
                  });
           });
    </script>

And it should be enough. Just needed to add two lines.

If you really want you can use the following patch but it really doesn't make too much sense to me.

All other patches are at #369329: Several patches to the Launchpad theme.