Answer the question
In order to leave comments, you need to log in
How to make Pluso social share buttons work with turbolinks Rails?
Tried different ways, like these:
$(document).on('ready page:load', function () {
});
var ready;
ready = function() {
};
$(document).ready(ready);
$(document).on('page:load', ready);
(function() {
if (window.pluso)if (typeof window.pluso.start == "function") return;
if (window.ifpluso==undefined) { window.ifpluso = 1;
var d = document, s = d.createElement('script'), g = 'getElementsByTagName';
s.type = 'text/javascript'; s.charset='UTF-8'; s.async = true;
s.src = ('https:' == window.location.protocol ? 'https' : 'http') + '://share.pluso.ru/pluso-like.js';
var h=d[g]('body')[0];
h.appendChild(s);
}})();
<div class="pluso" data-background="#ebebeb" data-options="big,square,line,horizontal,counter,theme=04" data-services="vkontakte,odnoklassniki,facebook,twitter,google,moimir,email,print"></div>
Answer the question
In order to leave comments, you need to log in
if (window.pluso)if (typeof window.pluso.start == "function") return;
$(document).on("page:receive", function(){
window.pluso = null;
window.ifpluso = null;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question