<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UXDriven &#187; lab</title>
	<atom:link href="http://blog.uxdriven.com/category/lab/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.uxdriven.com</link>
	<description>Design. Build. Convert.</description>
	<lastBuildDate>Thu, 17 Sep 2009 18:58:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>De-Pagify &#8211; Endless Scroll jQuery Plugin</title>
		<link>http://blog.uxdriven.com/2009/09/16/de-pagify-endless-scroll-jquery-plugin/</link>
		<comments>http://blog.uxdriven.com/2009/09/16/de-pagify-endless-scroll-jquery-plugin/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 17:01:31 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[lab]]></category>

		<guid isPermaLink="false">http://blog.uxdriven.com/?p=91</guid>
		<description><![CDATA[De-pagify let&#8217;s you easily enable endless scroll for paged sites such as
fmylife, digg, failblog to enable functionality similar to
Bing image search.

See the article: Making a Case For Endless Scrolling.

You can find this plugin at
http://plugins.jquery.com/project/de-pagify
or view latest code &#38; documentation is available at
http://github.com/ericclemmons/de-pagify.

Demo

View Demo



Usage

Typical usage will follow the pattern:

jQuery(link).depagify(options);


Options

Where link matches the &#8220;Next Page&#8221; link and [...]]]></description>
			<content:encoded><![CDATA[<p>De-pagify let&#8217;s you easily enable <a href="http://uipatternfactory.com/p=endless-scrolling/" title="Endless Scroll">endless scroll</a> for paged sites such as
<a href="http://www.fmylife.com" title="F My Life">fmylife</a>, <a href="http://digg.com" title="Digg">digg</a>, <a href="http://failblog.org" title="Failblog">failblog</a> to enable functionality similar to
<a href="http://www.bing.com/images/search?q=jquery" title="jQuery Images">Bing image search</a>.</p>

<p>See the article: <a href="http://blog.uxdriven.com/2009/09/17/making-a-case-for-endless-scrolling/">Making a Case For Endless Scrolling</a>.</p>

<p>You can find this plugin at
<a href="http://plugins.jquery.com/project/de-pagify">http://plugins.jquery.com/project/de-pagify</a>
or view latest code &amp; documentation is available at
<a href="http://github.com/ericclemmons/de-pagify">http://github.com/ericclemmons/de-pagify</a>.</p>

<h2>Demo</h2>

<p><a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/demo.php">View Demo</a></p>

<p><span id="more-91"></span></p>

<h2>Usage</h2>

<p>Typical usage will follow the pattern:</p>

<pre><code>jQuery(link).depagify(options);
</code></pre>

<h3>Options</h3>

<p>Where <em>link</em> matches the &#8220;Next Page&#8221; link and <em>options</em> can override
any of the following:</p>

<ul>
<li><p><strong>container</strong>: (<em>defaults to <code>body</code></em>) Where content is appended and where
remote content comes from</p></li>
<li><p><strong>filter</strong>: (<em>defaults to <code>null</code></em>) Selector or function to filter remote content</p></li>
<li><p><strong>trigger</strong>: (<em>defaults to <code>0.90</code></em>) Float, integer, string or function to
determine when to load remote content.
The default is <code>0.90</code>, which is <code>90%</code>.
You can use <code>167</code>, for example, to load content when the user
scrolls within <code>167px</code> of the bottom of the page.
Also, you can specify a selector (such as <code>#footer</code>) to load
content when the <code>#footer</code> element scrolls into view.
Finally, you can write your own function that returns <code>true</code>
whenever you&#8217;d like load the next page&#8217;s content.</p></li>
<li><p><strong>request</strong>: Callback when content is being requested.  Useful for cleaning up
the page or providing UI feedback.</p></li>
<li><p><strong>success</strong>: Callback when content is appended.  Useful for cleaning up new
content or messaging the user.</p></li>
<li><p><strong>effect</strong>:  (<em>defaults to <code>$(this).show()</code></em>) Function to transition newly
loaded content.  (New content is wrapped by <code>$('&lt;div /&gt;).hide()</code>)</p></li>
</ul>

<h2>Recipes</h2>

<p>Here are a couple popular, ready-to-go bookmarklets you can inject into everyday
websites.  Keep in mind you may need to either inject jQuery with a bookmarklet
(<a href="http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet" title="jQuerify">link</a>) and the <a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/bookmarklet.jquery.js">De-pagify</a> bookmarklet.</p>

<ul>
<li><a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/recipes/digg.bookmarklet.js">Digg.com</a> (<a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/recipes/digg.js">source</a>)</li>
<li><a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/recipes/fmylife.bookmarklet.js">FMyLife.com</a> (<a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/recipes/fmylife.js">source</a>)</li>
</ul>

<h2>Examples</h2>

<p>To play around with de-pagify, you should probably get the
<a href="http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet" title="jQuerify">jQuerify Bookmarklet</a> which will inject jQuery into the page.</p>

<p>Secondly, take advantage of the <a href="http://uxdriven.com/static/js/uxdriven/jquery/de-pagify/bookmarklet.jquery.js">De-Pagify Bookmarklet</a></p>

<h3>Example 1:  FMyLife.com</h3>

<p>First &amp; foremost, we can simply enable de-pagify via:</p>

<pre><code>jQuery('.pagination:last a:last').depagify({
    container: '#wrapper',
});
</code></pre>

<p>Simply put, <code>.pagination:last a:last</code> will grab the last anchor tag in the last
<code>.pagination</code> element on the page.  All new content will be pulled from the remote
<code>#wrapper</code> element and appended to the current <code>#wrapper</code> element.</p>

<p>But let&#8217;s say we want to only load content when the footer comes into view,
and we&#8217;d like a smoother animation instead of showing results immediately:</p>

<pre><code>jQuery('.pagination:last a:last').depagify({
    trigger: '#footer',
    container: '#wrapper',
    effect: function() {
        jQuery(this).fadeIn('slow');
    }
});
</code></pre>

<p>When new content is inserted in the page, it is wrapped in a plain <code>&lt;div&gt;</code> to
simplify DOM manipulation.  This <code>&lt;div&gt;</code> is bound to <code>this</code> in the <code>effect</code>
callback.</p>

<p>So, we have a pretty nice, smooth experience now.  However, say you want to
remove the page lists (1, 2, 3, Next, Prev, etc.) and the ads to ensure a more
consistent experience:</p>

<pre><code>jQuery('.pagination:last a:last').depagify({
    trigger: '#footer',
    container: '#wrapper',
    effect: function() {
        jQuery(this).fadeIn('slow');
    },
    request: function(options) {
        jQuery('.pagination', options.container).remove();
    },
    success: function(event, options) {
        jQuery('#ad_leaderboard', options.container).remove();
    }
});
</code></pre>

<p>The code is self-explanatory.  When we send off the request, we remove the
<code>.pagination</code> element, as it is not needed anymore.  Similarly, when the new
content is inserted all ads are removed.  Both events could take place entirely
in the <code>success</code> callback, but for this example I separated the two.</p>

<h2>Conclusion</h2>

<p>If you can help in any way, please fork this project or provide feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.uxdriven.com/2009/09/16/de-pagify-endless-scroll-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
