Hi I know a lot has already been asked about this, but I cant find the answer that will help me out.
What I have is a webpage with a number of galleries that are using fancybox to display the big pictures. What I want is to include the twitter and facebook like buttons to the fancybox overlay of the image.
This is the page: http://ift.tt/1GkTjzf
I tried it first using JSFiddle and there everything works great ( http://ift.tt/1B7tu1h )
html:
<a class="fancybox" title=" " data-fancybox-group="gallery1" href="http://ift.tt/1GkTjzi">using text iso image since i have not enough reputations</a><br/>
javascript:
$(".fancybox")
.fancybox({
beforeShow: function () {
// Add tweet button
this.title = '<a href="http://ift.tt/oQ7mBx" class="twitter-share-button" data-count="none" data-url="' + this.href + '">Tweet</a> ';
// Add FaceBook like button
this.title += '<iframe src="//www.facebook.com/plugins/like.php?href=' + this.href + '&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:23px;" allowTransparency="true"></iframe>';
},
afterShow: function () {
// Render tweet button
twttr.widgets.load();
},
helpers: {
title: {
type: 'inside'
}
}
});
But when I put this code in my webpage only the twitter icon is shown, the facebook like button is missing.
I can't seem to figure out why.
If someone could tell me what I'm doing wrong I would be very greatful.
Thanks, Ruben.
Aucun commentaire:
Enregistrer un commentaire