-
Notifications
You must be signed in to change notification settings - Fork 401
Open
Description
Hi guys again ...
Seems that : encodeURIComponent(this.settings.media) and encodeURIComponent(this.settings.description) , are not getting the correct data .
In my basic knowledge I needed to add data-media so I can do the next implementation:
$(shareElement).each(function(i) {
var lnk = $(this).attr('data-url'),
txt = $(this).attr('data-text'),
media = $(this).attr('data-media'),
resTxt = encodeURIComponent(txt),
resLnk = encodeURIComponent(lnk),
resMedia = encodeURIComponent(media);
$(this).sharrre({
share: {
facebook: true,
twitter: true,
pinterest: true,
},
template: '<ul class="box"><!--<li> <h2>{total}<small>Compartido</small> </h2> </li>--><li id="facebook"><i class="fa fa-facebook"></i></li><li id="twitter"><i class="fa fa-twitter"></i></li><li id="pinterest"><i class="fa fa-pinterest"></i></li></ul>',
enableHover: false,
enableTracking: false,
buttons: {
facebook: {
layout: 'button',
send: true
},
twitter: {
via: 'robbreportmx',
},
pinterest: {
url:''+ lnk + '',
media: ''+ media + '',
description: ''+ txt + ''
}
},
render: function(api, options) {
$(api.element).on('click', '#twitter', function() {
api.openPopup('twitter');
return false;
});
$(api.element).on('click', '#facebook', function() {
api.openPopup('facebook');
return false;
});
$(api.element).on('click', '#pinterest', function() {
api.openPopup('pinterest');
return false;
});
}
});
});
Thank you
Metadata
Metadata
Assignees
Labels
No labels