<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Improved Animated Scrolling Script for Same-Page Links</title>
	<atom:link href="http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Sun, 14 Mar 2010 16:12:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79794</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Sat, 06 Mar 2010 03:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79794</guid>
		<description>Hey Ryan, 

Sorry you&#039;re having problems with the plugin and jQuery 1.4. I&#039;m not able to reproduce them, though. Can you give me some more information?  Is it breaking in all browsers you&#039;ve tested or one in particular? Do you have a test page that I can look at? Thanks.</description>
		<content:encoded><![CDATA[<p>Hey Ryan, </p>
<p>Sorry you&#8217;re having problems with the plugin and jQuery 1.4. I&#8217;m not able to reproduce them, though. Can you give me some more information?  Is it breaking in all browsers you&#8217;ve tested or one in particular? Do you have a test page that I can look at? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79773</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 05 Mar 2010 00:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79773</guid>
		<description>Hey Karl,

Great plugin. Very lightweight and worked great with jQuery 1.3.2. I&#039;ve since upgraded to 1.4 and the functionality seems to be broken. Do you have an update available for your smoothScroll plugin? I&#039;d rather not switch to Ariel&#039;s localScroll and scrollTo since it&#039;s more functionality than I need.

Thanks much!</description>
		<content:encoded><![CDATA[<p>Hey Karl,</p>
<p>Great plugin. Very lightweight and worked great with jQuery 1.3.2. I&#8217;ve since upgraded to 1.4 and the functionality seems to be broken. Do you have an update available for your smoothScroll plugin? I&#8217;d rather not switch to Ariel&#8217;s localScroll and scrollTo since it&#8217;s more functionality than I need.</p>
<p>Thanks much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79768</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Wed, 03 Mar 2010 00:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79768</guid>
		<description>That&#039;s fine if you can be absolutely certain that the href doesn&#039;t include any domain or path information. And if you&#039;re writing a general-purpose script, you can&#039;t be absolutely certain.

For example, on this page, I would want a links with the following hrefs to have the animated scroll:

a. http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comments
b. /2007/10/improved-animated-scrolling-script-for-same-page-links#comments

They wouldn&#039;t work with your selector.</description>
		<content:encoded><![CDATA[<p>That&#8217;s fine if you can be absolutely certain that the href doesn&#8217;t include any domain or path information. And if you&#8217;re writing a general-purpose script, you can&#8217;t be absolutely certain.</p>
<p>For example, on this page, I would want a links with the following hrefs to have the animated scroll:</p>
<p>a. <a href="http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comments" rel="nofollow">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comments</a><br />
b. /2007/10/improved-animated-scrolling-script-for-same-page-links#comments</p>
<p>They wouldn&#8217;t work with your selector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79766</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Tue, 02 Mar 2010 19:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79766</guid>
		<description>For the initial problem presented on this page, why not just do what this script does: http://eddcouchman.com/notebook/smooth-scrolling-links/ which is &#039;a[href^=#]:not([href=#])&#039;</description>
		<content:encoded><![CDATA[<p>For the initial problem presented on this page, why not just do what this script does: <a href="http://eddcouchman.com/notebook/smooth-scrolling-links/" rel="nofollow">http://eddcouchman.com/notebook/smooth-scrolling-links/</a> which is &#8216;a[href^=#]:not([href=#])&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marek</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79746</link>
		<dc:creator>Marek</dc:creator>
		<pubDate>Fri, 26 Feb 2010 13:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79746</guid>
		<description>I&#039;ve just implemented the script from github and it looks to be working when clicking on the a href it jumps to the specific area intended to jump to but it does not scroll up to the page just jumps up there with no animation.

I&#039;m using jquery-1.4.2.min.js is this the reason to why it&#039;s not working with the smooth scroll animation?

Sorry i am complete noob when it comes to javascript</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just implemented the script from github and it looks to be working when clicking on the a href it jumps to the specific area intended to jump to but it does not scroll up to the page just jumps up there with no animation.</p>
<p>I&#8217;m using jquery-1.4.2.min.js is this the reason to why it&#8217;s not working with the smooth scroll animation?</p>
<p>Sorry i am complete noob when it comes to javascript</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Mitchell</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79688</link>
		<dc:creator>David Mitchell</dc:creator>
		<pubDate>Wed, 10 Feb 2010 19:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79688</guid>
		<description>Hi:

Will this script work or can it be adapted for lateral motion on a page. In otherwords it would scroll from side to side. Any thoughts?</description>
		<content:encoded><![CDATA[<p>Hi:</p>
<p>Will this script work or can it be adapted for lateral motion on a page. In otherwords it would scroll from side to side. Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79667</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79667</guid>
		<description>Hi! I am having problems using this script in Opera 10.10, but it works in all other browsers. I am forced to use the following code:

&lt;pre&gt;&lt;code&gt;
$(document).ready(function() {
  function filterPath(string) {
    return string
      .replace(/^\//,&#039;&#039;)  
      .replace(/(index&#124;default).[a-zA-Z]{3,4}$/,&#039;&#039;)  
      .replace(/\/$/,&#039;&#039;);
  }
  $(&#039;a[href*=#]&#039;).each(function() {
    if ( filterPath(location.pathname) == filterPath(this.pathname)
    &amp;&amp; location.hostname == this.hostname
    &amp;&amp; this.hash.replace(/#/,&#039;&#039;) ) {
      var $targetId = $(this.hash), $targetAnchor = $(&#039;[name=&#039; + this.hash.slice(1) +&#039;]&#039;);
      var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
       if ($target) {
         var targetOffset = $target.offset().top;
         $(this).click(function() {
           $(&#039;html, body&#039;).animate({scrollTop: targetOffset}, 500);
           return false;
         });
      }
    }
  });
});
&lt;/code&gt;&lt;/pre&gt;

If I use any of the updates, even those that are supposed to fix problems in Opera, it stops working on all browsers. I opened the demo in your (Karl&#039;s) last comment and that works fine in Opera. I&#039;m not sure what is wrong in my code. Here is my page:

http://www.mattmakesmedia.com/blue/work.php

Any help would be much appreciated. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi! I am having problems using this script in Opera 10.10, but it works in all other browsers. I am forced to use the following code:</p>
<pre><code>
$(document).ready(function() {
  function filterPath(string) {
    return string
      .replace(/^\//,'')
      .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
      .replace(/\/$/,'');
  }
  $('a[href*=#]').each(function() {
    if ( filterPath(location.pathname) == filterPath(this.pathname)
    &amp;&amp; location.hostname == this.hostname
    &amp;&amp; this.hash.replace(/#/,'') ) {
      var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']');
      var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
       if ($target) {
         var targetOffset = $target.offset().top;
         $(this).click(function() {
           $('html, body').animate({scrollTop: targetOffset}, 500);
           return false;
         });
      }
    }
  });
});
</code></pre>
<p>If I use any of the updates, even those that are supposed to fix problems in Opera, it stops working on all browsers. I opened the demo in your (Karl&#8217;s) last comment and that works fine in Opera. I&#8217;m not sure what is wrong in my code. Here is my page:</p>
<p><a href="http://www.mattmakesmedia.com/blue/work.php" rel="nofollow">http://www.mattmakesmedia.com/blue/work.php</a></p>
<p>Any help would be much appreciated. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79628</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Mon, 25 Jan 2010 17:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79628</guid>
		<description>Hi Adrian,

It seems to be working for me at &lt;a href=&quot;http://plugins.learningjquery.com/smooth-scroll/demo/old.html&quot; rel=&quot;nofollow&quot;&gt;this page&lt;/a&gt;. I just copied the code from this post and pasted it into that page.

I tested in Mac FF 3.5.7 and Safari 4.x, as well as Windows IE6, 7, and 8.

Is there a particular browser in which it isn&#039;t working for you?</description>
		<content:encoded><![CDATA[<p>Hi Adrian,</p>
<p>It seems to be working for me at <a href="http://plugins.learningjquery.com/smooth-scroll/demo/old.html" rel="nofollow">this page</a>. I just copied the code from this post and pasted it into that page.</p>
<p>I tested in Mac FF 3.5.7 and Safari 4.x, as well as Windows IE6, 7, and 8.</p>
<p>Is there a particular browser in which it isn&#8217;t working for you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79627</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79627</guid>
		<description>Just FYI, this has stopped working with jQuery 1.4</description>
		<content:encoded><![CDATA[<p>Just FYI, this has stopped working with jQuery 1.4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links/comment-page-1#comment-79444</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Tue, 29 Dec 2009 03:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links#comment-79444</guid>
		<description>Hi Mark,
I wouldn&#039;t rely on browser sniffing; it&#039;s notoriously unreliable. If you want a solution that takes the browser differences into account through feature testing, check out &lt;a href=&quot;http://github.com/kswedberg/jquery-smooth-scroll&quot; rel=&quot;nofollow&quot;&gt;my plugin&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Hi Mark,<br />
I wouldn&#8217;t rely on browser sniffing; it&#8217;s notoriously unreliable. If you want a solution that takes the browser differences into account through feature testing, check out <a href="http://github.com/kswedberg/jquery-smooth-scroll" rel="nofollow">my plugin</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
