Reputation:
Hi i'm using html5 facebook like button, i would like to trigger the click on that clicking on another styled button, is it possible?
Me i tryed this with no results:
<div class="row-fluid centered-content">
<div class="hide">
<div id="fb-root"></div>
<div class="fb-like" data-href="<?php echo current_url(); ?>" data-send="false" data-width="1" data-show-faces="false" data-font="arial"></div>
</div>
<a href="javascript:void(0)" onclick="$('.fb-like').trigger('click');" rel="tooltipRIGHT" data-original-title="Share on facebook"><img src="<?php echo base_static_url();?>img/icons/facebook.png" width="24" height="24"/></a>
</div>
Upvotes: 0
Views: 3159
Reputation: 367
This shouldnt be possible cause of security reasons.
If you could delegate clicks to facebook or twitter like buttons, you wouldnt need any permission from the user to do so...
Upvotes: 1