I'm using this code (standard FB Like):
<div id="like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe></div>
I need to hide the complete div
(or iframe
) when the user clicks on it.
I tried the onclick
event but it didn't work inside iframe
.
How can I do this?
You could do something like this:
HTML:
Javascript: