<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://labs.echoditto.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>EchoDitto Labs - javascript - Comments</title>
 <link>http://labs.echoditto.com/taxonomy/term/35</link>
 <description>Comments for &quot;javascript&quot;</description>
 <language>en</language>
<item>
 <title>I don&#039;t know -- I&#039;d say that</title>
 <link>http://labs.echoditto.com/node/64#comment-3880</link>
 <description>&lt;p&gt;I don&#039;t know -- I&#039;d say that a CSS rollover should be the preferred option.  For one thing, it&#039;ll degrade gracefully in the face of a partial JS implementation (my old T-Mobile Sidekick comes to mind).  For another, it&#039;ll typically take less bandwidth to do the CSS rollover (if you&#039;re using a JS framework, anyway).  For a third, you typically attach JS events after the DOM finishes loading -- CSS will work during page load.  And finally, you have to jump through some hoops to preload images (prior to rolling over) if you do it with Javascript.  With CSS there&#039;s no need.&lt;/p&gt;
&lt;p&gt;The only downside to the approach Meaghan outlined is that it only works for rollovers with solid colors. But there&#039;s a variation I&#039;ve seen some of our design partners deliver that gets around this limitation.&lt;/p&gt;
&lt;p&gt;First, define a hyperlink with a fixed height and width.  Give it a background image that&#039;s twice the height it needs to be: the top is the normal view, the bottom is the rollover.  Then set the hyperlink&#039;s :hover pseudoclass to add &quot;background-position: -20px 0;&quot; to the element&#039;s styles when the mouse is over it (for a button that&#039;s 20 pixels high, of course -- in this case the bg image would be 40px tall).&lt;/p&gt;
&lt;p&gt;The bonus to this approach is that if the image is loaded at all, so is the rollover.  The downside is that it relies on a background image for conveying meaning, which can potentially be less 508 compliant than an image with an appropriately-defined alt tag.  As a workaround I suggest giving the hyperlink the &quot;overflow:hidden&quot; style and a large enough padding-top value that the link&#039;s text will be safely pushed out of the viewable area (and hidden by the overflow setting). That should be easily spiderable/screen-read and not interfere with your rollover&#039;s appearance.&lt;/p&gt;
</description>
 <pubDate>Wed, 13 Feb 2008 14:17:04 -0800</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3880 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Not a bad workaround!  But</title>
 <link>http://labs.echoditto.com/node/64#comment-3879</link>
 <description>&lt;p&gt;Not a bad workaround!  But really, why not just learn JQuery? It&#039;s super-easy, esp. if you already have a handle on CSS.&lt;/p&gt;
</description>
 <pubDate>Wed, 13 Feb 2008 05:29:34 -0800</pubDate>
 <dc:creator>Ben</dc:creator>
 <guid isPermaLink="false">comment 3879 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>FDSAGSDF DFHSGF DFHGFH</title>
 <link>http://labs.echoditto.com/jquery-1.2#comment-3860</link>
 <description>&lt;p&gt;FDSAGSDF DFHSGF DFHGFH RTSHDDT RSTHRSHR RSTHRS SRTH&lt;/p&gt;
</description>
 <pubDate>Wed, 05 Dec 2007 23:29:09 -0800</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 3860 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Thanks for the tip, Joshua.</title>
 <link>http://labs.echoditto.com/jquery-1.2#comment-3033</link>
 <description>&lt;p&gt;Thanks for the tip, Joshua.  I have to confess that I haven&#039;t had a need for fancy UI effects since my jQuery conversion.  But the UI plugin certainly looks impressive -- it&#039;s nice to know I won&#039;t have to go crawling back to scriptaculous if a client insists on drag-n-drop.&lt;/p&gt;
</description>
 <pubDate>Thu, 20 Sep 2007 07:39:13 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3033 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>If you&#039;ve used the Interface</title>
 <link>http://labs.echoditto.com/jquery-1.2#comment-3020</link>
 <description>&lt;p&gt;If you&#039;ve used the Interface plugin for jQuery, and are excited about the new jQuery 1.2, as I am, you should also check out jQuery UI. This was released on Sunday, less than a week after 1.2 was released. Check it out at &lt;a href=&quot;http://ui.jquery.com/&quot; title=&quot;http://ui.jquery.com/&quot;&gt;http://ui.jquery.com/&lt;/a&gt;.&lt;/p&gt;
</description>
 <pubDate>Wed, 19 Sep 2007 20:50:12 -0700</pubDate>
 <dc:creator>JoshuaIsaac</dc:creator>
 <guid isPermaLink="false">comment 3020 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
