I want to open a Div and append the Facebook comments box when I click on a “Show comments” link. But I want to append the FB-Comments just once, and then just use the link to toggle that Div.
I was trying something like this but it just appends it every time I click on the link, of course…
Thanks!!
UPDATE:
Now it’s working great, but if someone knows a most efficient way to do it, you’re welcome!
Add a class name to the target element after adding the content. Check for the existence of the class name before adding it a second time.
1) add the class
2) check for the class