<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Highlight Table Rows, Columns, and Cells Using MooTools&#160;1.2.3</title> <atom:link href="http://davidwalsh.name/highlight-table-columns/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/highlight-table-columns</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 10:59:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Josh</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-27307</link> <dc:creator>Josh</dc:creator> <pubDate>Thu, 20 Oct 2011 03:21:33 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-27307</guid> <description>Hi David -
Thanks for the great coding. I just launched a microsite that makes use of your work (with a few newbie-level modifications). You can see it here: http://www.crittervidder.com.
Thanks again!
- Josh</description> <content:encoded><![CDATA[<p>Hi David -<br
/> Thanks for the great coding. I just launched a microsite that makes use of your work (with a few newbie-level modifications). You can see it here: <a
href="http://www.crittervidder.com" rel="nofollow">http://www.crittervidder.com</a>.<br
/> Thanks again!<br
/> - Josh</p> ]]></content:encoded> </item> <item><title>By: justin</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-23045</link> <dc:creator>justin</dc:creator> <pubDate>Sun, 13 Mar 2011 23:49:50 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-23045</guid> <description>He David,I want to use this great thing in a &quot;tabbed content&quot; with 3 different tabs and put one table in each tab.
The problem hereby is that it only highlights the first table in the first tab and the other ones aren´t highlighted, unfortunately.
I noticed that the table &quot;highlight-table&quot; is an id, what tells me that it can only be used for one time on the same page.
So my question: how can I use the effect, by defining the entire table &quot;highlight-table&quot; as a class, rather than an id???Thanks a lot! :) Hit me up, if you need to see an example of what I mean.Cheers,
Justin</description> <content:encoded><![CDATA[<p>He David,</p><p>I want to use this great thing in a &#8220;tabbed content&#8221; with 3 different tabs and put one table in each tab.<br
/> The problem hereby is that it only highlights the first table in the first tab and the other ones aren´t highlighted, unfortunately.<br
/> I noticed that the table &#8220;highlight-table&#8221; is an id, what tells me that it can only be used for one time on the same page.<br
/> So my question: how can I use the effect, by defining the entire table &#8220;highlight-table&#8221; as a class, rather than an id???</p><p>Thanks a lot! :) Hit me up, if you need to see an example of what I mean.</p><p>Cheers,<br
/> Justin</p> ]]></content:encoded> </item> <item><title>By: Casey</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-18918</link> <dc:creator>Casey</dc:creator> <pubDate>Tue, 20 Jul 2010 10:01:05 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-18918</guid> <description>Hello,First, want to tell you I love this code. I&#039;m using it to make a military pay chart:http://militarytips.net/military-pay-chart-2010/Can you tell me how to do this with multiple tables on the same page? I tried it, but only the first table works. My plan is to copy three versions of the code and rename &quot;highlight-table&quot; in each one. But I know there&#039;s got to be an easier way! What I want to do is divide out the table into Officer, Warrant Officer, and Enlisted.Thanks,
Casey</description> <content:encoded><![CDATA[<p>Hello,</p><p>First, want to tell you I love this code. I&#8217;m using it to make a military pay chart:</p><p><a
href="http://militarytips.net/military-pay-chart-2010/" rel="nofollow">http://militarytips.net/military-pay-chart-2010/</a></p><p>Can you tell me how to do this with multiple tables on the same page? I tried it, but only the first table works. My plan is to copy three versions of the code and rename &#8220;highlight-table&#8221; in each one. But I know there&#8217;s got to be an easier way! What I want to do is divide out the table into Officer, Warrant Officer, and Enlisted.</p><p>Thanks,<br
/> Casey</p> ]]></content:encoded> </item> <item><title>By: Chris the Developer</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-13549</link> <dc:creator>Chris the Developer</dc:creator> <pubDate>Thu, 12 Nov 2009 06:12:33 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-13549</guid> <description>@wguru - You speak of things from the realm of desktop...You should consult the arcane wizard known only as goo-Gle. He knows the secret things of the enemy. He will be your weapon at the hordes.</description> <content:encoded><![CDATA[<p>@wguru &#8211; You speak of things from the realm of desktop&#8230;You should consult the arcane wizard known only as goo-Gle. He knows the secret things of the enemy. He will be your weapon at the hordes.</p> ]]></content:encoded> </item> <item><title>By: wguru</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-13548</link> <dc:creator>wguru</dc:creator> <pubDate>Thu, 12 Nov 2009 05:06:06 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-13548</guid> <description>Likely this&#039;s a site where advanced users get together and swap stories and tips, but in this article, while it seems to relate to what I&#039;m seeing, might someone here educate the common user as to how (aside from DOS or injections of script or code) most users can configure what gets highlighted in Windows folders?  Aside from hovering and automatically highlighting a file name, assumably assumedly, crap however you spell, where/how it is that can configure how single clicking a file name only hightlights the file name and not the entire row of details?One of my os&#039;s (XP SP3&#039;s) only highlights the file name, while annoyingly my other os (Vistas&#039;s) highlights the entire row of columnized details for the chosen file name.That latter, highlighting all details, is a bit of an annoyance because it forces users to expand windows enough to extend beyond the last column so the user can click outside the columns in order to click-hold and drag a capture box for a group of files.  Likely it doesn&#039;t require learning DOS to change this behavior, so where does the common user configure what gets highlighted (just the file name as opposed to it and all it&#039;s details)?Please don&#039;t ask me if I want wine with that cheese.</description> <content:encoded><![CDATA[<p>Likely this&#8217;s a site where advanced users get together and swap stories and tips, but in this article, while it seems to relate to what I&#8217;m seeing, might someone here educate the common user as to how (aside from DOS or injections of script or code) most users can configure what gets highlighted in Windows folders?  Aside from hovering and automatically highlighting a file name, assumably assumedly, crap however you spell, where/how it is that can configure how single clicking a file name only hightlights the file name and not the entire row of details?</p><p>One of my os&#8217;s (XP SP3&#8242;s) only highlights the file name, while annoyingly my other os (Vistas&#8217;s) highlights the entire row of columnized details for the chosen file name.</p><p>That latter, highlighting all details, is a bit of an annoyance because it forces users to expand windows enough to extend beyond the last column so the user can click outside the columns in order to click-hold and drag a capture box for a group of files.  Likely it doesn&#8217;t require learning DOS to change this behavior, so where does the common user configure what gets highlighted (just the file name as opposed to it and all it&#8217;s details)?</p><p>Please don&#8217;t ask me if I want wine with that cheese.</p> ]]></content:encoded> </item> <item><title>By: Chris the Developer</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-11935</link> <dc:creator>Chris the Developer</dc:creator> <pubDate>Thu, 17 Sep 2009 10:55:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-11935</guid> <description>how about this approach?window.addEvent(&#039;domready&#039;, function() {
var columns = [], rows = [], cells = [], length = 0,
table = document.id(&#039;highlight-table&#039;);
rows = table.getElements(&#039;tbody tr&#039;);
cells = $$(rows.getElements(&#039;td&#039;));
length = rows[0].getElements(&#039;td&#039;).length;
for (i = 0; i &lt; length; i++) {
columns[i] = table.getElements(&#039;td:nth-child(&#039; + (i + 1) + &#039;)&#039;).set(&#039;data-column&#039;, i);
};
for (j = 0; j &lt; rows.length; j++) {
rows[j].getElements(&#039;td&#039;).set(&#039;data-row&#039;, j);
}
cells.addEvents({
&#039;mouseenter&#039;: function() {
columns[this.get(&#039;data-column&#039;)].addClass(&#039;column-hover&#039;);
rows[this.get(&#039;data-row&#039;)].addClass(&#039;row-hover&#039;);
this.addClass(&#039;cell-hover&#039;);
},
&#039;mouseleave&#039;: function() {
columns[this.get(&#039;data-column&#039;)].removeClass(&#039;column-hover&#039;);
rows[this.get(&#039;data-row&#039;)].removeClass(&#039;row-hover&#039;);
this.removeClass(&#039;cell-hover&#039;);
}
});
});</description> <content:encoded><![CDATA[<p>how about this approach?</p><p>window.addEvent(&#8216;domready&#8217;, function() {<br
/> var columns = [], rows = [], cells = [], length = 0,<br
/> table = document.id(&#8216;highlight-table&#8217;);</p><p> rows = table.getElements(&#8216;tbody tr&#8217;);<br
/> cells = $$(rows.getElements(&#8216;td&#8217;));<br
/> length = rows[0].getElements(&#8216;td&#8217;).length;</p><p> for (i = 0; i &lt; length; i++) {<br
/> columns[i] = table.getElements(&#039;td:nth-child(&#039; + (i + 1) + &#039;)&#039;).set(&#039;data-column&#039;, i);<br
/> };</p><p> for (j = 0; j &lt; rows.length; j++) {<br
/> rows[j].getElements(&#039;td&#039;).set(&#039;data-row&#039;, j);<br
/> }</p><p> cells.addEvents({<br
/> &#039;mouseenter&#039;: function() {<br
/> columns[this.get(&#039;data-column&#039;)].addClass(&#039;column-hover&#039;);<br
/> rows[this.get(&#039;data-row&#039;)].addClass(&#039;row-hover&#039;);</p><p> this.addClass(&#039;cell-hover&#039;);<br
/> },<br
/> &#039;mouseleave&#039;: function() {<br
/> columns[this.get(&#039;data-column&#039;)].removeClass(&#039;column-hover&#039;);<br
/> rows[this.get(&#039;data-row&#039;)].removeClass(&#039;row-hover&#039;);</p><p> this.removeClass(&#039;cell-hover&#039;);<br
/> }<br
/> });<br
/> });</p> ]]></content:encoded> </item> <item><title>By: Jesus DeLaTorre</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-11928</link> <dc:creator>Jesus DeLaTorre</dc:creator> <pubDate>Wed, 16 Sep 2009 19:55:16 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-11928</guid> <description>I was going to suggest that you cache the tr elements and then noticed you did this in the more efficient method. :) Good job. I definately like the second version a lot better as well.</description> <content:encoded><![CDATA[<p>I was going to suggest that you cache the tr elements and then noticed you did this in the more efficient method. :) Good job. I definately like the second version a lot better as well.</p> ]]></content:encoded> </item> <item><title>By: derschreckliche</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-11927</link> <dc:creator>derschreckliche</dc:creator> <pubDate>Wed, 16 Sep 2009 19:28:11 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-11927</guid> <description>Hey, nice approach!
Could be very useful!</description> <content:encoded><![CDATA[<p>Hey, nice approach!<br
/> Could be very useful!</p> ]]></content:encoded> </item> <item><title>By: Darkimmortal</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-11926</link> <dc:creator>Darkimmortal</dc:creator> <pubDate>Wed, 16 Sep 2009 17:33:38 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-11926</guid> <description>Could probably be quite a bit faster without the recursion ;)</description> <content:encoded><![CDATA[<p>Could probably be quite a bit faster without the recursion ;)</p> ]]></content:encoded> </item> <item><title>By: Chris Bolson</title><link>http://davidwalsh.name/highlight-table-columns/comment-page-1#comment-11922</link> <dc:creator>Chris Bolson</dc:creator> <pubDate>Wed, 16 Sep 2009 15:25:31 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3052#comment-11922</guid> <description>@David Walsh:  hehe.
And whilst you are there, if you want to save another line of code you could define the variable &quot;row&quot; like this:var rows = document.id(&#039;highlight-table&#039;).getElements(&#039;tbody tr&#039;);I don&#039;t think that that makes it any more efficient, just saves defining the variable &quot;table&quot; (which you don&#039;t use)Anyway, I realise that this is just a demo ;)</description> <content:encoded><![CDATA[<p>@David Walsh:  hehe.<br
/> And whilst you are there, if you want to save another line of code you could define the variable &#8220;row&#8221; like this:</p><p>var rows = document.id(&#8216;highlight-table&#8217;).getElements(&#8216;tbody tr&#8217;);</p><p>I don&#8217;t think that that makes it any more efficient, just saves defining the variable &#8220;table&#8221; (which you don&#8217;t use)</p><p>Anyway, I realise that this is just a demo ;)</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/17 queries in 0.011 seconds using disk: basic
Object Caching 865/866 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 08:39:35 -->
