문제

I'm adding a Facebook 'like' button to the DOM using this jQuery plugin: http://onerutter.com/open-source/jquery-facebook-like-plugin.html

It works fine in all browsers except Firefox. The way it works is that when a certain link is clicked, some data is loaded including the URL for the 'Like' button to use, so a new Like button is generated and added to the DOM.

So in Firefox, it's rendered but when I click on it, nothing happens. This is happening on multiple machines with Firefox.

Strangely though, after a Firefox restart in which an Addon has been disabled, suddenly the Like button works, but as soon as you refresh the page it won't!

What could be happening? This is seriously confusing. It's Firefox 3.6.10 by the way.

Thanks :)

도움이 되었습니까?

해결책

I was actually hiding the div which the like button was being rendered in and the callback the div was being faded in in another callback, one for a fadeout of a loading graphic. Apparently, in Firefox, Facebook JS has a problem with properly setting up the button when its being faded in from a callback of a fadeout.

It's probably a scope error. Anyway, solved :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top