Unfortunately, for now, a way to manually call the plugin doesn’t exist. If there will be more requests like this one, I will consider adding it (it would require some changes in the plugin’s code).
Thread Starter
veevee
(@veevee)
Resolved.
I created a jQuery function to encapsulate the pin-it plugin’s setup and bound that function to the events I needed as well as document.ready. It seems like it would be too much to bind that to a generic event so that the plugin could be recalled whenever.
That way I wouldn’t need to avoid updates too 🙂
Changes on lines 1-16 of script.js
;(function($){
"use strict";
var jpibfi_debug = false;
$(document).ready( function() {
jPinit();
$('.post').bind('RMRHContentExpanded RMRHContentCollapsed',function(e,data)
{
jPinit();
// return false; // prevents event from bubbling up the DOM
});
});
function jPinit(){
var settings = {
pageUrl : document.URL,
Thread Starter
veevee
(@veevee)
…Kind of…
After calling the plugin a second time, the pin it button sometimes flickers when you hover over it. I’m guessing it has something to do with the mousein/mouseout set Intervals. I tried removing all instances of the button when calling the plugin a second time and then replacing them (like what you worked out for window resize). But that doesn’t seem to have any effect. Still trying to figure that out, I made a work around that’s basically just a slow animation out before the button gets removed, but I’ll need to find something to fix that flicker. Let me know if you have any ideas? Thanks
Hi again,
currently I’m working on refactoring JavaScript code to make things like adding images manually work. I’m not ready yet with a new version of the plugin to include those changes, but if you want, you can download the current version here: http://downloads.wordpress.org/plugin/jquery-pin-it-button-for-images.zip (it’s a development version, not 100% tested).
I tested it on Twenty Twelve theme using Jetpack’s infinite scroll function and it works just fine. Here’s the code that’s needed for the Twenty Twelve and Jetpack pair to make it work.
http://pastebin.com/n4fbDhKt
Also, take a look at the document.ready code of the plugin itself, it might help you. Let me know if it helped.