I have a button in the html:

<a id="comment">Comment</a>

When it is clicked I want the browser to focus on Facebook comments' textarea. I have:

$("#comment").click(function() {
        $("#fb-comments textarea").focus();
    });

but it doesn't work

有帮助吗?

解决方案

It's served via an Iframe from Facebook, so you cannot access the content due to the Same Origin Policy. (you cannot do this at all)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top