fancybox iframe floating

345 views
Skip to first unread message

Samir

unread,
Dec 7, 2012, 1:55:35 PM12/7/12
to fanc...@googlegroups.com
Hi,

If you go to http://fancybox.net/ and then click on this link "Iframe (75% width and height)", it opens iframe window.  But when you scroll up or down on parent windows, this iframe window stays in same position.   Can the iframe window “float” so that if the person has scrolled down the page it will appear wherever they are at?

If so, can you please help me with coding?


Thanks,

Samir

JFK

unread,
Dec 7, 2012, 7:24:14 PM12/7/12
to fanc...@googlegroups.com
in that page the iframe actually scrolls up and down with the page
if you want it to remain always visible regardless you scroll the parent page, then set the option `"centerOnScroll" : true`

Samir

unread,
Dec 13, 2012, 5:25:24 PM12/13/12
to fanc...@googlegroups.com
Thanks for reply.

I tried that but not working.


Go to http://fancybox.net/ and scroll all the way to bottom.  Then click on "Iframe (75% width and height)".  Once you see iframe, scroll parent page all the way to top.  Now the iframe window no longer visible since you scrolled to the top of the page.  In order to see that iframe, you have to scroll to the bottom.

What I'm trying to do is, I want that iframe window to be visible even when user scroll.  When the parent window is scrolled to top or bottom, the iframe window should also scroll with it.

Thanks,


Samir

JFK

unread,
Dec 13, 2012, 6:44:31 PM12/13/12
to fanc...@googlegroups.com
the answer (again) is : add 'centerOnScroll' true to your custom script
Seeing is believing? See it yourself then http://jsfiddle.net/3xKYw/

Milkman

unread,
Dec 13, 2012, 9:04:51 PM12/13/12
to fanc...@googlegroups.com
Well quite nice conversation ...

What JFK said is:

"add the option 'centerOnScroll' with the value 'true' (without single-brackets) to your fancybox instantiation."

I hope this is some kind of understandable translation ;)

Tony Alfrey

unread,
Dec 13, 2012, 9:15:22 PM12/13/12
to fanc...@googlegroups.com
And indeed it is perfectly understandable if you look at the code
example he posted. You would not even need to know what "Option" meant
or "instantiate" meant.


Milkman wrote:
> Well quite nice conversation ...
>
> What JFK said is:
>
> "add the option 'centerOnScroll' with the value 'true' (without
> single-brackets) to your fancybox instantiation."
>
> I hope this is some kind of understandable translation ;)
>
> Am Freitag, 14. Dezember 2012 00:44:31 UTC+1 schrieb JFK:
>> the answer (again) is : add 'centerOnScroll' : true to your custom script
>> Seeing is believing? See it yourself then http://jsfiddle.net/3xKYw/
>>
>> On Thursday, December 13, 2012 2:25:24 PM UTC-8, Samir wrote:
>>> Thanks for reply.
>>>
>>> I tried that but not working.
>>>
>>>
>>> Go to http://fancybox.net/ and scroll all the way to bottom. Then click
>>> on "Iframe (75% width and height) <http://fancybox.net/data/iframe.html>".
>>> Once you see iframe, scroll parent page all the way to top. Now the iframe
>>> window no longer visible since you scrolled to the top of the page. In
>>> order to see that iframe, you have to scroll to the bottom.
>>>
>>> What I'm trying to do is, I want that iframe window to be visible even
>>> when user scroll. When the parent window is scrolled to top or bottom, the
>>> iframe window should also scroll with it.
>>>
>>> Thanks,
>>>
>>>
>>> Samir
>>>
>>>
>>>
>>> On Friday, December 7, 2012 6:24:14 PM UTC-6, JFK wrote:
>>>> in that page the iframe actually scrolls up and down with the page
>>>> if you want it to remain always visible regardless you scroll the parent
>>>> page, then set the option `"centerOnScroll" : true`
>>>>
>>>> On Friday, December 7, 2012 10:55:35 AM UTC-8, Samir wrote:
>>>>> Hi,
>>>>>
>>>>> If you go to http://fancybox.net/ and then click on this link "Iframe
>>>>> (75% width and height) <http://fancybox.net/data/iframe.html>", it
>>>>> opens iframe window. But when you scroll up or down on parent windows,
>>>>> this iframe window stays in same position. Can the iframe window
>>>>> �float� so that if the person has scrolled down the page it will appear
>>>>> wherever they are at?
>>>>>
>>>>> If so, can you please help me with coding?
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Samir
>>>>>
>


--
Tony Alfrey
tonya...@earthlink.net
"I'd Rather Be Sailing"

Milkman

unread,
Dec 13, 2012, 9:21:16 PM12/13/12
to fanc...@googlegroups.com
yep .. you're right ... I didn't click on the link.
sorry for my sloppy comment ;)

Tony Alfrey

unread,
Dec 13, 2012, 9:27:07 PM12/13/12
to fanc...@googlegroups.com
No problem. ;-)
>>>>>>> �float� so that if the person has scrolled down the page it will

JFK

unread,
Dec 14, 2012, 12:24:15 AM12/14/12
to fanc...@googlegroups.com
TRUE indeed goes without quotes (not brackets) because both integer and Boolean values go without quotes (true is a Boolean value)
>>>>>>> �float� so that if the person has scrolled down the page it will

Samir

unread,
Dec 14, 2012, 10:28:43 AM12/14/12
to fanc...@googlegroups.com
i actually made changed on my working env but testing in production server :)  my bad.  it's working fine.  thanks.
Reply all
Reply to author
Forward
0 new messages