Facebook Application iFrame Fixed Element -


I have to make a definite element (a DIV) in the IFrame for my Facebook application. So when the user scrolls down the page, then that element is still fixed at the top of the browser window?

Origin: You add stuff to the bag, while you scroll down, and a certain division when you add these things to the bag, show your "score" when you scroll "Score Counter" Should always be seen

Thank you!

This is not possible if you are using the IFrame Auto-resizing feature of Facebook. Once iframe resizes, so scrolling is not necessary, only available scroll will be one of the original windows. However, the child's IFrame has no information about the scrolling of the parent window (because they are not on the same domain ...) and are trying to scroll the event or the scroll position will return only that scrollbar Position is at 0, or the highest.

You can, however, click on the events and remove the click event or the offset of the clicked element.

Some examples:

  $ ('clickme'). Click (function (e) {e.preventDefault (); var top; // Using click position E.pageY and e.pageX is available) top = e.pageY; // click element element position using top = $ (this) .offet (). Top; $ ('#movement'). CSS ({'top': top - 100 + 'px'}); //}   

Maybe you can base your conversation on this principle instead?

Comments