basZero
basZero

Reputation: 4284

Fancybox 1.3.x ignores width and height parameters

I am using Fancybox 1.3.4 (currently the latest) and I use the following HTML elements:

<a href="LARGE_URL" title="FANCY_CAPTION" rel="gallery" class="gallery-item">
  <img src="SMALL_URL"/> 
</a> 
<a> ... repeat N times... </a>

Then I use the following jQuery code:

<script>
  $(document).ready(function() {
    $('a.gallery-item').fancybox({
        'autoDimensions': 'false',
        'width':900,
        'height':'auto',
        'cyclic': true,
        'centerOnScroll': 'false',
        'hideOnOverlayClick': true,
        'hideOnContentClick': false,
        'overlayShow': true,
        'overlayOpacity': 0.7,
        'overlayColor': '#666',
        'titleShow': true,
        'titlePosition': 'inside',
        'transitionIn': 'elastic',
        'transitionOut': 'elastic',
        'speedIn': 400,
        'speedOut': 200,
        'showCloseButton': true,
        'showNavArrows': true,
        'enableEscapeButton': true
    });
  });        
</script>

I also tried

    'width':'900',

or setting both

    'width':900,
    'height':600,

but it just does not work.

Any solutions to this?

I need the #fancybox-wrapper element in an exact size.

Upvotes: 1

Views: 2219

Answers (1)

Julia Khmylova
Julia Khmylova

Reputation: 71

try to remove quotes around false:

'autoDimensions': false

Upvotes: 2

Related Questions