I have a problem with sharing images to social media as (Facebook, Twitter,...) as the image is an popup image which means it doesn't show in a separate link so i cant share the full url , and the other problem that the source of the image tag is pointing to my storage here is the image code:
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
<a class="fancybox-buttons img-holder small-img" rel="gallery" title="" data-fancybox-group="button" href="/storage/galleries/">
<img src="/storage/galleries/" alt="img">
</a>
</div>
here is the Js code for the popup
$('.fancybox-buttons').fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = '<a href="https://www.facebook.com/sharer/sharer.php?u=" class="btn btn-fb btn-small"><i class="fa fa-facebook right-fa"></i> Share</a>' +
'<a href="https://twitter.com/intent/tweet?url=" class="btn btn-tw btn-small"><i class="fa fa-twitter right-fa"></i> Share</a>' +
'<a href="https://plus.google.com/share?url=" class="btn btn-inst btn-small"><i class="fa fa-instagram right-fa"></i> Share</a>';
}
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire