<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>random utterings...: Changing images with JQuery and the fade effect</title>
    <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Changing images with JQuery and the fade effect</title>
      <description>&lt;p class="credits"&gt;&lt;img style="width:600px;" src="http://blog.randomutterings.com/images/articles/gallery.png"&gt;&lt;br&gt;Photo by &lt;a href="http://www.flickr.com/photos/randomutterings/"&gt;me!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It took me a bit of digging to figure out how to fade out a picture, change the src, then fade it back in.  I started out trying to use Scriptaculous but I got stuck trying to get the queue setup to wait until the image was faded out to change the src.  I ended up using jQuery which also gave me a bonus, the solution is unabtrusive.&lt;/p&gt;

&lt;p&gt;Here are the application.js and show.html.haml files from my project.&lt;/p&gt;

&lt;script src="http://gist.github.com/64723.js"&gt;&lt;/script&gt;



</description>
      <pubDate>Sun, 15 Feb 2009 10:14:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3c3f2d0f-45b6-4208-8135-cb9a144b2694</guid>
      <author>Chris Barnes</author>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect</link>
      <category>Ruby on Rails</category>
      <category>Javascript</category>
      <category>ruby</category>
      <category>rails</category>
      <category>Javascript</category>
      <category>JQuery</category>
      <trackback:ping>http://blog.randomutterings.com/articles/trackback/32</trackback:ping>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by Dadooo</title>
      <description>for some reasons i got an error and delay while loading multiple images...

use $("#medium_photo").attr('src',src).unbind();
after loading is complete</description>
      <pubDate>Tue, 26 Jul 2011 12:13:15 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fc1fd0d4-d588-41a5-85ca-73aa828061bf</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-6717</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by id meneo</title>
      <description>Thanks, I was looking for that. I'm also looking for a way to make the image change automatically.</description>
      <pubDate>Fri, 17 Jun 2011 07:40:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4c45975b-b428-4e18-8634-0fe001333c03</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-6651</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by sushil</title>
      <description>I clicked on the thumbnails above, but noticed no change on the big image. Please look into it.</description>
      <pubDate>Mon, 13 Jun 2011 16:30:49 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1493bbd2-e796-4b96-a909-48d28fb47efd</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-6639</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by Hancy</title>
      <description>Hello Friend,Whichever style of Fashion Shoes you're looking for, classical, fashionable, lovely or the latest design, you can find your favorite designer shoes in &lt;a href="http://www.dunkpage.com" rel="nofollow"&gt;www.dunkpage.com&lt;/a&gt; ,several days ago I bought one pair of shoes from there,It's beautiful and very comfortable!</description>
      <pubDate>Fri, 10 Jun 2011 14:16:08 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e9b83ef3-73a8-42ab-a625-fa429540aaac</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-6635</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by cheap tiffany co jewelry</title>
      <description>I am profoundly grateful, touched by the great distinction and honor and great compliment accorded me by the 

authorities of Harvard this morning. I am overwhelmed, as a matter of fact, and I am rather fearful of my inability 

to maintain such a high rating as you've been generous enough to accord to me. In these historic and lovely 

surroundings, this perfect day, and this very wonderful assembly, it is a tremendously impressive thing to an 

individual in my position.&lt;a href="http://www.tiffanyandcooutlet.net/" rel="nofollow"&gt;tiffany and co outlet&lt;/a&gt;</description>
      <pubDate>Tue, 12 Apr 2011 01:36:50 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:40a7e99b-02f5-429f-9618-3352d4caecaa</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-6422</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by camera stores sydney</title>
      <description>Don&#8217;t stop writing, you&#8217;ve given me lots of good info!
</description>
      <pubDate>Wed, 27 Jan 2010 03:06:34 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c62e6e95-08a6-47ed-9e84-b78f451b04ac</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-5382</link>
    </item>
    <item>
      <title>"Changing images with JQuery and the fade effect" by Lokoder</title>
      <description>Thanks from Brazil ;)</description>
      <pubDate>Wed, 14 Oct 2009 13:25:56 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9b3f4a99-0e81-453c-b145-6e2fd7243fba</guid>
      <link>http://blog.randomutterings.com/articles/2009/02/15/changing-images-with-jquery-and-the-fade-effect#comment-4963</link>
    </item>
  </channel>
</rss>

