setting iframe scroll bar properties

3,099 views
Skip to first unread message

RoyMck

unread,
Sep 1, 2009, 12:43:48 PM9/1/09
to fancybox
I'm sending an html file to an iframe using the following code:

<a href="faculty-subpage.html?iframe">Bio</a>

I can set certain properties of the iframe via jquery as I have here:

$(document).ready(function() {
$("div.faculty_stub h5 a").fancybox({
'frameWidth': 550,
'frameHeight': 600,
'overlayOpacity': 0.8,
'easingIn' : 'easeInCubic', 'easingOut' : 'easeOutCubic'
});
});

When I look at the list of "Available Options" on the fancybox.net
site (or in the list of fancybox.defaults at the bottom of the
jquery.fancybox-1.2.1.js file) there are no options that control the
scroll bars of an iframe.

Is there a way to set the fancybox iframe to 'scrolling="no"'?

Thanks.

MattVent

unread,
Sep 15, 2009, 11:53:35 AM9/15/09
to fancybox
RoyMck,

The only way I could find to do this was to use CSS.

Open the file 'jquery.fancybox.css' and find the line;

#fancy_ajax {
width: 100%;
height: 100%;
overflow: auto;
}

Change it to ;

#fancy_ajax {
width: 100%;
height: 100%;
overflow: hidden;
}

This will remove the scrollbars completely!

Hope this helps,
Matt

On Sep 1, 5:43 pm, RoyMck <rmcke...@vcu.edu> wrote:
> I'm sending an html file to an iframe using the following code:
>
> <a href="faculty-subpage.html?iframe">Bio</a>
>
> I can set certain properties of the iframe via jquery as I have here:
>
> $(document).ready(function() {
>         $("div.faculty_stub h5 a").fancybox({
>                         'frameWidth': 550,
>                         'frameHeight': 600,
>                         'overlayOpacity': 0.8,
>                         'easingIn' : 'easeInCubic', 'easingOut' : 'easeOutCubic'
>         });
>
> });
>
> When I look at the list of "Available Options" on thefancybox.net
> site (or in the list offancybox.defaults at the bottom of the
> jquery.fancybox-1.2.1.js file)  there arenooptions that control thescrollbars of an iframe.
>
> Is there a way to set thefancyboxiframe to 'scrolling="no"'?
>
> Thanks.
Reply all
Reply to author
Forward
0 new messages