We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
First, thanks for this awesome plugin. Setting up sharing button has never been easier.
But I've got a problem with the plugin.
I'm using the 'template' option and for an unknown reason, the render function is call twice.
here
/src/js/jquery.sharrre.js -- line 102
if (self.options.template !== '') { //for personalized button (with template) this.options.render(this, this.options); }
and here
/src/js/jquery.sharrre.js -- line 203
if (shareCount === this.options.shareTotal) { this.options.render(this, this.options); }
Here is my js
$('#share-button').sharrre({ share: { twitter: true, facebook: true }, buttons: { facebook: {layout: 'box_count'}, twitter: {count: 'vertical'} }, title: $(this).data('href'), url: $(this).data('url'), template: '<ul class="list-inline social-icons"><li><div class="item"><a href="#" class="facebook"><i class="fa fa-facebook"></i></a></div></li><li><div class="item"><a href="#" class="twitter"><i class="fa fa-twitter"></i></a></div></li></ul>', enableHover: false, enableTracking: false, render: function(api, options){ console.log('render'); render: function(api, options){ console.log('render'); $(api.element) .off('click') .on('click', '.twitter', function() { api.openPopup('twitter'); }) .on('click', '.facebook', function() { api.openPopup('facebook'); }); } } });
to avoid popup opening twice, I add ".off('click')" on the render function. But I'd rather understand where is my mistake.
Thanks,
Francois
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
First, thanks for this awesome plugin.
Setting up sharing button has never been easier.
But I've got a problem with the plugin.
I'm using the 'template' option and for an unknown reason, the render function is call twice.
here
/src/js/jquery.sharrre.js -- line 102
and here
/src/js/jquery.sharrre.js -- line 203
Here is my js
to avoid popup opening twice, I add ".off('click')" on the render function.
But I'd rather understand where is my mistake.
Thanks,
Francois
The text was updated successfully, but these errors were encountered: