Sharrre
Sharrre copied to clipboard
pre-load buttons on page load with counter enabled?
Hi,
Thanks for this great plugin! I'm giving it a try, and it works smoothly.
One question: when counter is enabled, is there a way to load the individual buttons on page load, instead of on mouseover of the counter button? Loading (especially the facebook button) can take a while, so IMO it could improve user experience if the buttons are loaded in the background (while still offering the counter as first 'incentive' to share a page).
(How) Can this be done?
Best,
Ron
Hi, What example do you use ? This http://sharrre.com/example3.html ?
Sorry, examples are indeed easier to refer to. Yep: that's the one. What I have in mind is that the individual buttons for the different social services are loaded in the background, so the user (most likely) doesn't have to wait when hovering the counter button.
Ron
Without being impatient (I'm not sure if you just asked for more info or are working on it), do you think it is feasible?
Yes, I think is possible, I will add this functionality on the next update.
ps: sorry for the late reply, I'm very busy right now :)
Julienh - I'm looking for the same thing. Has this been built in yet and if so how do I make it work? I just want the buttons to show, no hover required. Thanks.
Hi Julienh - I'm looking for the same thing too. Now that it's already been over 2 years since the initial question was asked, has this been built in yet and if so how do I make it work? I just want the buttons and count over each button to show without the user having to hover... Thanks.
It should have been fixed with the 2.0.0 release.
Strange, I've just checked with 2.0.1, and behaviour seems unchanged. Though I've noticed that http://sharrre.com/example3.html is still referring to an older version (http://sharrre.com/js/jquery.sharrre-1.3.4.min.js?v=3), it doesn't change if I try it with a local version that uses the latest Sharrre code.
What I had in mind is that the .buttons element would be created upon initialization of the share box; not upon mouseenter. That way, the loading of the buttons could take place invisibly in the background, and the user wouldn't have to wait until all share buttons are loaded after hovering the #shareme element.
I will look into it.
Wait a minute, could that be what the "render" function is for? I found an example in this fiddle:
$('#shareme').sharrre({
...
render: function(api, options) {
api.loadButtons();
}
...
});
When I add this to my own code, this seems to do the trick. So it could just be a documentation issue (the documentation is very concise for the "render" property, and the loadButtons() function isn't documented at all it seems)?