Plugin compatibility code

Many plugins run after the page has loaded and process existing content. Since Infinite Scroll dynamically adds new content to the page, sometimes you have to execute additional code to reinitialize those plugins.

For the plugins below, the following code goes in the Javascript Callback option.

Lightbox JS 1.0:
No compatibility code available.
Lightbox JS 2.0:

myLightbox.updateImageList();

Shutter Reloaded:

shutterReloaded.Init('sh');

Thickbox:

 tb_init( $('a.thickbox, area.thickbox, input.thickbox',this) );

1 Pixel Out Audio Player:
Compatible! Version 2.0, too.
Yahoo Media Player:

YAHOO.MediaPlayer.addTracks( this );

HighslideJS:

$('a.highslide',this).click(function() {  return hs.expand(this);})

WP-SimpleViewer:
Not compatible.

To refer to the most recently added content:

    this;     // as of ver 1.1, the keyword this is the content wrapper (typically a DIV)
    $(this);  // the jQuery object including this
    $jQis('#infscr-page-'+INFSCR.currPage) // old 'n busted ver 1.0 style.

11 comments.

11 Comments »

Comment by BOLL
2008-07-01 06:02:02

This works for Shutter Reloaded:

shutterReloaded.Init('sh');

Though it seems the script needs more code to be executed, as it fails to display the half transparent shade over the entire page when more posts has been loaded. Something that the author of Shutter Reloaded might have to look into.

Comment by Paul Irish
2008-07-01 20:45:57

Hmmm.. yeah i think that’s the best trick thats immediately obvious. It probably needs to revaluate the window height. Thanks for testing that out.

 
 
Comment by Space Roach
2008-09-11 05:43:22

What about simpleviewer? I can’t get it to show the galleries when brought in from the infinite scroll. Otherwise everything is perfect.

 
Comment by pinocchio
2008-09-11 15:45:16

what about highslide?
Please tell me.

WP Plugin is Highslide Integration
http://highslideintegration.scrollleiste.de/

JS site
http://highslide.com/

 
Comment by Paul Irish
2008-09-11 16:11:02

HighslideJS:

$jQis('#infscr-page-'+INFSCR.currPage +' a.highslide').click(function() {
 return hs.expand(this);
});
Comment by pinocchio
2008-09-11 18:05:32

Thank you.

 
Comment by pinocchio
2008-09-11 18:16:24

i inserted code in “Infinite Scroll Options > Javascript to be called after the next posts are fetched: ” but highslide js did not work.
Do you have different thing?
anyway, thank you~

 
 
Comment by pinocchio
2008-09-28 18:16:21

I’m ugly English. So I hope you understand it.
First, thank you for the solution about highslide.
well, how about jw flv player? I try it but can’t find. help me, please.

 
Comment by pinocchio
Comment by Paul Irish
2008-09-29 21:59:52

Thanks for the links, pinocchio. :)

Right now infinite scroll cannot support those plugins. They inject <script> tags into the document, and the internal’s of infinite scroll are stripping out those tags.

Next version I’ll release will have a workaround and will shoot to support those tags. Sorry and thanks!

Comment by pinocchio
2008-10-01 19:01:10

Thank you for the answer. Good luck with everything.

(Comments wont nest below this level)
 
 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use basic HTML. Wrap code in <pre lang="javascript"></pre> .