<?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>Free Web Resources - Web Resources Depot &#187; Scroll</title>
	<atom:link href="http://www.webresourcesdepot.com/tag/scroll/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webresourcesdepot.com</link>
	<description>Free Web Resources</description>
	<lastBuildDate>Sat, 20 Mar 2010 05:01:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load Content While Scrolling With jQuery</title>
		<link>http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/</link>
		<comments>http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 05:01:40 +0000</pubDate>
		<dc:creator>Umut M.</dc:creator>
				<category><![CDATA[Browsing]]></category>
		<category><![CDATA[CC License]]></category>
		<category><![CDATA[Extras]]></category>
		<category><![CDATA[Goodies]]></category>
		<category><![CDATA[License Free]]></category>
		<category><![CDATA[MIT License]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Scroll]]></category>

		<guid isPermaLink="false">http://www.webresourcesdepot.com/?p=327</guid>
		<description><![CDATA[We generally have lots of content to present but can not load all of it at once as it may take too long.
I always loved the dZone&#8217;s Ajax content loading while scrolling feature and created a similar one using jQuery.
I&#8217;m pleased to share with WebResourcesDepot readers (Check the demo &#8211; scroll down to see new [...]]]></description>
			<content:encoded><![CDATA[<p>We generally have lots of content to present but can not load all of it at once as it may take too long.</p>
<p>I always loved the <strong>dZone&#8217;s Ajax content loading while scrolling</strong> feature and created a similar one using <strong>jQuery.</strong></p>
<p>I&#8217;m pleased to share with <strong>WebResourcesDepot</strong> readers (<a href="http://www.webresourcesdepot.com/dnspinger/" target="_blank"><strong>Check the demo</strong></a> &#8211; scroll down to see new content in the demo)</p>
<p>This <strong>Ajax auto content loading</strong> can very be handy in almost every project. <span style="font-weight: bold;">D</span><strong>on&#8217;t forget to bookmark it (<a target="_blank" href="http://del.icio.us/webresourcesdepot?url=http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery-tutorial%2F&amp;title=Load Content While Scrolling With jQuery">del.icio.us link</a>)</strong>.</p>
<p><a target="_blank" href="http://www.webresourcesdepot.com/dnspinger"><img width="480" height="84" alt="jQuery Load Content While Scrolling" src="http://www.webresourcesdepot.com/wp-content/uploads/jquery-content-scroller.gif" /></a></p>
<p><a href="http://www.webresourcesdepot.com/wp-content/uploads/file/wrd-scroll.zip" target="_blank"><img width="150" height="70" align="left" style="margin-right: 10px;" src="http://www.webresourcesdepot.com/wp-content/uploads/image/download.jpg" alt="Download Load Content While Scrolling With jQuery" /></a></p>
<p>
Download package includes a working demo coded with ASP with a test MySQL database. ASP code is just a simple query so you can switch it with a one you like easily.</p>
<p>&nbsp;</p>
<p><span id="more-327"></span></p>
<h3>What is loading content while scrolling?</h3>
<p>When we are <strong>scrolling</strong> down a webpage, the code recognizes that you are at the bottom and <strong>auto-loads new content</strong>.</p>
<h3>Why to use it?</h3>
<p>It helps increasing the initial load speeds of pages faster and users will have to load only the content they see.</p>
<h3>How it works? (<a target="_blank" href="http://www.webresourcesdepot.com/dnspinger/">Check the demo</a>)</h3>
<p>In our case, we have DIVS holding contents where every DIV ID is content&#8217;s database ID.</p>
<ul>
<li>Content structure is like:</li>
</ul>
<p><code>&lt;div class=&quot;wrdLatest&quot; id=9&gt;content&lt;/div&gt;<br />
&lt;div </code><code>class</code><code>=&quot;wrdLatest&quot; id=8&gt;content&lt;/div&gt;</code></p>
<ul>
<li>We create a function sending a query to a dynamic file with the DIV ID of the latest wrdLatest DIV (and also put a loader image):</li>
</ul>
<p style="text-align: left;"><code>function lastPostFunc() <br />
{ <br />
&nbsp;&nbsp;&nbsp; $('div#lastPostsLoader').html('&lt;img src=&quot;bigLoader.gif&quot;&gt;');<br />
&nbsp;&nbsp;&nbsp; $.post(&quot;scroll.asp?action=getLastPosts&amp;lastID=&quot; + $(&quot;.wrdLatest:last&quot;).attr(&quot;id&quot;), </code> <code> &nbsp;&nbsp;&nbsp; <br />
</code></p>
<p style="text-align: left;"><code>&nbsp;&nbsp;&nbsp; function(data){<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (data != &quot;&quot;) {<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $(&quot;.wrdLatest:last&quot;).after(data);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $('div#lastPostsLoader').empty();<br />
&nbsp;&nbsp;&nbsp; });<br />
};&nbsp;<br />
</code></p>
<ul>
<li>When a user <strong>scrolls down</strong>, we understand that the scroller is at the bottom with teh function below and fire the <code>lastPostFunc</code> function.</li>
</ul>
<p><code>$(window).scroll(function(){<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if&nbsp; ($(window).scrollTop() == $(document).height() - $(window).height()){<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; lastPostFunc();<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />
}); </code></p>
<p>I have <a target="_blank" href="http://www.webresourcesdepot.com/dnspinger/">applied the demo to the DNSPinger service</a>. Simply scroll down to see new content loading.</p>
<h3>Dependencies</h3>
<p><strike>This is a very simple code that uses <strong>jQuery&#8217;s</strong> great </strike><a target="_blank" href="http://brandonaaron.net/docs/dimensions/"><strike><strong>dimensions plugin</strong></strike></a><strike> that helps us understand that we are at the bottom of the page.</strike> <strong>Update: Dimensions plugin</strong> is included with <strong>jQuery</strong> 1.2.6 and no need to include it as an extra.</p>
<p>Besides that, you can improve the code to detect the users sceen-size and load your initial content according to that screen size.</p>
<p><strong>Special Downloads:</strong><br />
<a href="http://www.webresourcesdepot.com/?download=jBasket" target="_blank">Ajaxed Add-To-Basket Scenarios With jQuery And PHP</a><br />
<a href="http://www.webresourcesdepot.com/?download=Free-Admin-Template" target="_blank">Free Admin Template For Web Applications</a><br />
<a href="http://www.webresourcesdepot.com/?download=jQuery-Dynamic-Drag-Drop" target="_blank">jQuery Dynamic Drag&#8217;n Drop</a><br />
<a href="http://www.webresourcesdepot.com/?download=sTwitter-1-0" target="_blank">ScheduledTweets</a></p>
<p><strong>Advertisements:</strong><br />
<a href="http://www.sslmatic.com" target="_blank">SSLmatic &#8211; Cheap SSL Certificates (from $19.99/year)</a><br />
<a href="http://twitter.com/umutm" target="_blank">Follow WebResourcesDepot At Twitter And Get More Resources!</a></p>

	Tags: <a href="http://www.webresourcesdepot.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.webresourcesdepot.com/tag/jquery/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.webresourcesdepot.com/tag/scroll/" title="Scroll" rel="tag">Scroll</a><br />

	<h4>Related posts</h4>
	<ul class='st-related-posts'>
	<li><a href="http://www.webresourcesdepot.com/table-sorter-plugin-for-jquery-tablesorter/" title="Table Sorter Plugin For jQuery: tablesorter (May 14, 2008)">Table Sorter Plugin For jQuery: tablesorter</a></li>
	<li><a href="http://www.webresourcesdepot.com/smart-floating-banners/" title="Smart Floating Banners (June 23, 2008)">Smart Floating Banners</a></li>
	<li><a href="http://www.webresourcesdepot.com/slideshow-js-unobtrusive-javascript-slideshow/" title="Slideshow JS: Unobtrusive JavaScript Slideshow (May 16, 2009)">Slideshow JS: Unobtrusive JavaScript Slideshow</a></li>
	<li><a href="http://www.webresourcesdepot.com/skin-your-ajax-applications-themeroller/" title="Skin Your Ajax Applications: ThemeRoller (June 10, 2008)">Skin Your Ajax Applications: ThemeRoller</a></li>
	<li><a href="http://www.webresourcesdepot.com/rounded-corners-with-no-images-using-curvycorners/" title="Rounded Corners With No Images Using curvyCorners (December 30, 2007)">Rounded Corners With No Images Using curvyCorners</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/feed/</wfw:commentRss>
		<slash:comments>97</slash:comments>
		</item>
		<item>
		<title>Javascript Scroll &#8211; Smoothly!</title>
		<link>http://www.webresourcesdepot.com/javascript-scroll-smoothly/</link>
		<comments>http://www.webresourcesdepot.com/javascript-scroll-smoothly/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 08:10:58 +0000</pubDate>
		<dc:creator>kayka</dc:creator>
				<category><![CDATA[Browsing]]></category>
		<category><![CDATA[Goodies]]></category>
		<category><![CDATA[No License]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Scroll]]></category>

		<guid isPermaLink="false">http://www.webresourcesdepot.com/javascript-scroll-smoothly/</guid>
		<description><![CDATA[df Smooth Scroll is a tiny javascript which lets you scroll the page slowly &#38; smoothly.
This script is too simple to understand and use. Nothing but playing with Anchor Tags.
Features:
- Simplest to implement
- One of the smallest Javascript 1024 bytes
- Cross-Browser compatible
- Includes the source file too&#8230;

Special Downloads:
Ajaxed Add-To-Basket Scenarios With jQuery And PHP
Free Admin [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dezinerfolio.com/2007/08/08/df-javascript-smooth-scroll/" target="_blank">df Smooth Scroll</a> is a tiny javascript which lets you scroll the page slowly &amp; smoothly.</p>
<p>This script is too simple to understand and use. Nothing but playing with <strong>Anchor Tags</strong>.</p>
<h3>Features:</h3>
<p>- Simplest to implement<br />
- One of the smallest Javascript 1024 bytes<br />
- Cross-Browser compatible<br />
- Includes the source file too&hellip;</p>
<p><a href="http://www.dezinerfolio.com/2007/08/08/df-javascript-smooth-scroll/" target="_blank"><img width="480" height="232" src="http://www.webresourcesdepot.com/wp-content/uploads/image/javascript-smooth-scroller.jpg" alt="Javascript Scroll" /></a></p>
<p><strong>Special Downloads:</strong><br />
<a href="http://www.webresourcesdepot.com/?download=jBasket" target="_blank">Ajaxed Add-To-Basket Scenarios With jQuery And PHP</a><br />
<a href="http://www.webresourcesdepot.com/?download=Free-Admin-Template" target="_blank">Free Admin Template For Web Applications</a><br />
<a href="http://www.webresourcesdepot.com/?download=jQuery-Dynamic-Drag-Drop" target="_blank">jQuery Dynamic Drag&#8217;n Drop</a><br />
<a href="http://www.webresourcesdepot.com/?download=sTwitter-1-0" target="_blank">ScheduledTweets</a></p>
<p><strong>Advertisements:</strong><br />
<a href="http://www.sslmatic.com" target="_blank">SSLmatic &#8211; Cheap SSL Certificates (from $19.99/year)</a><br />
<a href="http://twitter.com/umutm" target="_blank">Follow WebResourcesDepot At Twitter And Get More Resources!</a></p>

	Tags: <a href="http://www.webresourcesdepot.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.webresourcesdepot.com/tag/scroll/" title="Scroll" rel="tag">Scroll</a><br />

	<h4>Related posts</h4>
	<ul class='st-related-posts'>
	<li><a href="http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/" title="Load Content While Scrolling With jQuery (June 3, 2008)">Load Content While Scrolling With jQuery</a></li>
	<li><a href="http://www.webresourcesdepot.com/zoom-script-with-a-smart-interface-tjpzoom/" title="Zoom Script With A Smart Interface: TJPzoom (September 4, 2008)">Zoom Script With A Smart Interface: TJPzoom</a></li>
	<li><a href="http://www.webresourcesdepot.com/yui-slideshow-customizable-and-animated-slideshows/" title="YUI Slideshow: Customizable And Animated Slideshows (August 12, 2009)">YUI Slideshow: Customizable And Animated Slideshows</a></li>
	<li><a href="http://www.webresourcesdepot.com/wrap-content-around-images-jqslickwrap/" title="Wrap Content Around Images: jQSlickWrap (November 22, 2009)">Wrap Content Around Images: jQSlickWrap</a></li>
	<li><a href="http://www.webresourcesdepot.com/what-you-see-is-what-you-ajax-wavemaker/" title="What You See Is What You Ajax: WaveMaker (March 5, 2008)">What You See Is What You Ajax: WaveMaker</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.webresourcesdepot.com/javascript-scroll-smoothly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 15/31 queries in 0.100 seconds using disk

Served from: www.webresourcesdepot.com @ 2010-03-20 19:58:09 -->