lrsjng / jquery-fracs

jQuery plugin to determine the visible fractions of HTML elements.

Home Page:https://larsjung.de/jquery-fracs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make that?

SergeGrey opened this issue · comments

Hi! Sorry for my poor knowledge of English.
I have long tried to understand the settings, but I still have a question.
On default settings of script, element is fading, when it reaches the any side of browser window. How to make the element begin to fade at a distance of side window? Like that http://i.imgur.com/fdVgm.jpg where "some element #4" position is fixed and others elements scrolled under him.
Or how to make the element will have 100% of max possible visibility when it in some fixed area of window and will fade when it out of area?
Please answer.
Thank you!

Hi,

I'm afraid I don't really understand what you are trying to achieve... can you try to make it more clear, please?

Thanks
Lars

Sorry. Hard for me to explain.
Is it possible to change the viewport from the entire window to some area?
http://i.imgur.com/LKDXg.jpg

it's not possible to use this with callback functions for now, but you can use this static method
to get the fracs for a custom viewport.

http://larsjung.de/fracs/#def-static-fracs

It seems is what I need. I am newbie in javascript, please write example of a string:
jQuery.fracs( rect: Rect, [viewport: Rect] )
How to write the coordinates (left, top, right, bottom) instead of "Rect" in this string?