jQuery. Click HTML button to get clicked Facebook like button
问题 I have 2 buttons, 1 simple and other Facebook like button, I want to make that after my simple button is clicked, It activated(clicked) Facebook button too, but It wont work. I've used this code: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script> $(function(){ $("#test").click(function(){ $("#fb-root").click(); //this doesn't click Like button alert("Like is clicked"); // this alert when button is clicked }); }); </script> <div class="fb-like"