user895171
user895171

Reputation:

Jquery trigger click on facebook like button by clicking on another button

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

Answers (1)

ChaosClown
ChaosClown

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...

other answers to issue

Upvotes: 1

Related Questions