<?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: JavaScript nextSibling Firefox bug fix</title>
	<atom:link href="http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix</link>
	<description>andrewsellick.com</description>
	<lastBuildDate>Wed, 10 Mar 2010 23:46:56 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: emoedesign</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-56941</link>
		<dc:creator>emoedesign</dc:creator>
		<pubDate>Fri, 13 Nov 2009 15:23:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-56941</guid>
		<description>oops - i guess i can&#039;t place the html? - basically it&#039;s 
a number of divs with the class &quot;show&quot; in a table.</description>
		<content:encoded><![CDATA[<p>oops &#8211; i guess i can&#8217;t place the html? &#8211; basically it&#8217;s<br />
a number of divs with the class &#8220;show&#8221; in a table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: emoedesign</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-56940</link>
		<dc:creator>emoedesign</dc:creator>
		<pubDate>Fri, 13 Nov 2009 15:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-56940</guid>
		<description>I&#039;m experiencing extra spaces in firefox 3.5.5 when using the jquery hide function to hide divs when they are empty. I&#039;m pretty sure this is what i need but i have no idea how to implement it with the jquery hide function and am hoping someone might be able to help. Below is my jquery code: 


   $(document).ready(function () {
   
   $(&#039;.show&#039;).each(function() {
        if ($(this).text() == &quot;&quot;) {			
            $(this).hide();
        };
 	});   
});   


////The html is:


&lt;!-- $copy --&gt;

&lt;!-- $custom2 --&gt;
&lt;!-- $custom3 --&gt;


&lt;!-- $custom4 --&gt;
&lt;!-- $custom5 --&gt;


&lt;!-- $custom6 --&gt;
&lt;!-- $custom7 --&gt;



////end html

I did eliminate all spaces between divs and it did eliminate the spaces in output but it makes the code not human-readable friendly which i would like.

Thanks for any help! :)</description>
		<content:encoded><![CDATA[<p>I&#8217;m experiencing extra spaces in firefox 3.5.5 when using the jquery hide function to hide divs when they are empty. I&#8217;m pretty sure this is what i need but i have no idea how to implement it with the jquery hide function and am hoping someone might be able to help. Below is my jquery code: </p>
<p>   $(document).ready(function () {</p>
<p>   $(&#8217;.show&#8217;).each(function() {<br />
        if ($(this).text() == &#8220;&#8221;) {<br />
            $(this).hide();<br />
        };<br />
 	});<br />
});   </p>
<p>////The html is:</p>
<p><!-- $copy --></p>
<p><!-- $custom2 --><br />
<!-- $custom3 --></p>
<p><!-- $custom4 --><br />
<!-- $custom5 --></p>
<p><!-- $custom6 --><br />
<!-- $custom7 --></p>
<p>////end html</p>
<p>I did eliminate all spaces between divs and it did eliminate the spaces in output but it makes the code not human-readable friendly which i would like.</p>
<p>Thanks for any help! <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soniiic</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-56876</link>
		<dc:creator>soniiic</dc:creator>
		<pubDate>Fri, 18 Sep 2009 10:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-56876</guid>
		<description>I didn&#039;t like that if the element doesn&#039;t have a sibling, then the code errors out :/

I changed the code to check this (and also changed it so it gets the next node of the same type)

function getNextSibling(startBrother) {
    endBrother = startBrother.nextSibling;
    while (endBrother &amp;&amp; endBrother.nodeName != startBrother.nodeName) {
        endBrother = endBrother.nextSibling;
    }
    if (!endBrother) {
        return false;
    }
    return endBrother;
} 

use it like this:

if (getNextSibling(el)) {
    [//CODE//]
}</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t like that if the element doesn&#8217;t have a sibling, then the code errors out :/</p>
<p>I changed the code to check this (and also changed it so it gets the next node of the same type)</p>
<p>function getNextSibling(startBrother) {<br />
    endBrother = startBrother.nextSibling;<br />
    while (endBrother &amp;&amp; endBrother.nodeName != startBrother.nodeName) {<br />
        endBrother = endBrother.nextSibling;<br />
    }<br />
    if (!endBrother) {<br />
        return false;<br />
    }<br />
    return endBrother;<br />
} </p>
<p>use it like this:</p>
<p>if (getNextSibling(el)) {<br />
    [//CODE//]<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yanqiw</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-56559</link>
		<dc:creator>yanqiw</dc:creator>
		<pubDate>Tue, 28 Oct 2008 05:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-56559</guid>
		<description>so cool.. I like it. thanks.</description>
		<content:encoded><![CDATA[<p>so cool.. I like it. thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mayoorathen</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-47453</link>
		<dc:creator>Mayoorathen</dc:creator>
		<pubDate>Mon, 26 May 2008 12:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-47453</guid>
		<description>Just exploring some Javascript stuff. LOL, I accidently copied the code in comments, so it works. Same code works for previousSibling, only u have to chande the nextSibling to previousSibling. Great work!

Thanks.</description>
		<content:encoded><![CDATA[<p>Just exploring some Javascript stuff. LOL, I accidently copied the code in comments, so it works. Same code works for previousSibling, only u have to chande the nextSibling to previousSibling. Great work!</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oren</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-10036</link>
		<dc:creator>Oren</dc:creator>
		<pubDate>Sun, 11 Nov 2007 14:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-10036</guid>
		<description>the problem with this code starts when the 
startBrother.nextSibling = empty space, which in ie you can check it with &quot;if(startBrother.nextSibling)&quot; but with firefox there&#039;s a bit of complex.. didn&#039;t find the answer yet...</description>
		<content:encoded><![CDATA[<p>the problem with this code starts when the<br />
startBrother.nextSibling = empty space, which in ie you can check it with &#8220;if(startBrother.nextSibling)&#8221; but with firefox there&#8217;s a bit of complex.. didn&#8217;t find the answer yet&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovais</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-9076</link>
		<dc:creator>Ovais</dc:creator>
		<pubDate>Sat, 03 Nov 2007 15:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-9076</guid>
		<description>My Firefox version is 2.0.0.9</description>
		<content:encoded><![CDATA[<p>My Firefox version is 2.0.0.9</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovais</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-9075</link>
		<dc:creator>Ovais</dc:creator>
		<pubDate>Sat, 03 Nov 2007 15:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-9075</guid>
		<description>Thanks buddy...

I tried the code but to make it run I had to put 1 as String

function getNextSibling(startBrother){
  endBrother=startBrother.nextSibling;
  while(endBrother.nodeType!=&quot;1&quot;){
    endBrother = endBrother.nextSibling;
  }
  return endBrother;
}</description>
		<content:encoded><![CDATA[<p>Thanks buddy&#8230;</p>
<p>I tried the code but to make it run I had to put 1 as String</p>
<p>function getNextSibling(startBrother){<br />
  endBrother=startBrother.nextSibling;<br />
  while(endBrother.nodeType!=&#8221;1&#8243;){<br />
    endBrother = endBrother.nextSibling;<br />
  }<br />
  return endBrother;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Watson</title>
		<link>http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix/comment-page-1#comment-472</link>
		<dc:creator>Michael Watson</dc:creator>
		<pubDate>Wed, 06 Jun 2007 19:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/21/javascript-nextsibling-firefox-bug-fix#comment-472</guid>
		<description>Hey this is just what I was looking for. Thanks :)</description>
		<content:encoded><![CDATA[<p>Hey this is just what I was looking for. Thanks <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.609 seconds -->
