Iframe labels don't work on FB tabs

After spending all day trying to do the work with the anchor on facebook tabs, I refused and ask for help :)

On the next very simple tab http://www.facebook.com/pages/Testing-pages/196886257049573?sk=app_186989884709513 we have a binding at the end of the page, which should return the user to the top of the page.

If you leave the iframe scroll box, everything will work as expected, but if I get rid of the scroll bar with the following js:

window.fbAsyncInit = function() { FB.init({ appId: 'your_app_id', status: true, cookie: true, xfbml: true }); FB.Canvas.setSize(); }; 

the link stops working and does nothing. The following problem occurs in IE9, FF7, but works well in Safari and Chrome.

I am at a loss and really do not know what to do here.

NOTE 1. I tried the following plugin http://flesler.blogspot.com/2007/10/jqueryscrollto.html

NOTE 2. Try reloading the page through JS, but it reloads in the same place where it remains.

+4
source share
1 answer

So, I know this is pretty late, but with jQuery you can link any <a href=""></a> , starting with # , finding the top position of this element and then using FB.Canvas.scrollTo(0, position) to scroll to this item.

http://jsfiddle.net/sluzorz/efyVf/

Edit:

Use jQuery.offset() instead.

+6
source

All Articles