Tutorial :Fancybox options not having any effect



Question:

I'm using fancybox 1.2.1 to open an iframe. My problem is my width, height and scrolling options don't actually do anything. Am I missing something? It just opens up at the default size.

Heres the call:

$(document).ready(function(){    $('a[rel=gallery]').fancybox({      'width':920,      'height':700,      'scrolling':'no'  });  

});

And heres the link in the page:

<a class="iframe" href="http://www.myiframedomain.com/page.jsp" rel="gallery">    <img src="/img/content/button.png" width="210" height="115" alt="" />  </a>  

Thanks.


Solution:1

You aren't using the correct option names. width and height are defined in versions 1.3+.

For 1.2.1 use frameWidth and frameHeight instead. Look here for all the options (and note that there is no scrolling in 1.2.1).

What you've posted works perfectly fine in 1.3.1 without change though, so I suggest you upgrade if you can.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »