<?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: Show Hide Javascript</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/</link>
	<description></description>
	<lastBuildDate>Tue, 10 Jan 2012 01:21:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jazza</title>
		<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/comment-page-1/#comment-638196</link>
		<dc:creator>Jazza</dc:creator>
		<pubDate>Sat, 12 Sep 2009 07:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/#comment-638196</guid>
		<description>Finally a simple version of what I&#039;m after. Thanks.</description>
		<content:encoded><![CDATA[<p>Finally a simple version of what I&#039;m after. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gio</title>
		<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/comment-page-1/#comment-533964</link>
		<dc:creator>Gio</dc:creator>
		<pubDate>Thu, 25 Oct 2007 16:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/#comment-533964</guid>
		<description>This solution works great.  I&#039;m using this feature as a way for users to add a comment.  How can I have it go directly to the form to enter a comment rather than scolling down?</description>
		<content:encoded><![CDATA[<p>This solution works great.  I&#039;m using this feature as a way for users to add a comment.  How can I have it go directly to the form to enter a comment rather than scolling down?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: veronica</title>
		<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/comment-page-1/#comment-505518</link>
		<dc:creator>veronica</dc:creator>
		<pubDate>Fri, 23 Mar 2007 17:07:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/#comment-505518</guid>
		<description>(if this doesn&#039;t post well...then i have posted it on my web site, just follow the link above.)

i found a much easier solution to allow for showing and hiding of comments on the main index page.

&lt;code&gt;&lt;script language=&quot;Javascript 1.2&quot;
type=&quot;text/javascript&quot;&gt;
function show(id)
{
	el = document.getElementById(id);
	if (el.style.display == &apos;none&apos;)
	{
		el.style.display = &apos;&apos;;
		el = document.getElementById(&apos;more&apos; + id);
	} else {
		el.style.display = &apos;none&apos;;
		el = document.getElementById(&apos;more&apos; + id);
	}
}
&lt;/script&gt;
&lt;/code&gt;

so put that in the header.php or wherever your head tags are---that is, between the &lt;head&gt; tag.

second you need to edit the link for the comments and have a div tag containing the actual comment information.

so the link i use is this:  
&lt;code&gt;&lt;a href=&quot;javascript:show(&apos;vis-&lt;?php the_ID(); ?&gt;&apos;);&quot;&gt;&lt;?php comments_number(&apos;Comments (0)&apos;, &apos;Comments (1)&apos;, &apos;Comments (%)&apos;); ?&gt;&lt;/a&gt;&lt;/code&gt;

i use &#039;the_ID()&quot; tag so that way it doesn&#039;t confuse the browser and it validates the code.  this way, each comment is unique to the individual post.

the next thing to do is set up the div. 


&lt;code&gt;&lt;div align=&quot;left&quot; id=&quot;vis-&lt;?php the_ID(); ?&gt;&quot; style=&quot;display: none&quot;&gt; 
&lt;?php $withcomments = true; comments_template();?&gt;
&lt;/div&gt;
&lt;/code&gt;
that&#039;s it!  you don&#039;t need a plug-in...unless you don&#039;t know how to edit the files in wordpress...hrm.  maybe i should create a plug-in for the less code-adept.

the javascript is a less than tweaked version of tom mcmillen&#039;s code found here: http://lists.evolt.org/archive/Week-of-Mon-20020624/116152.html

cheers.</description>
		<content:encoded><![CDATA[<p>(if this doesn&#039;t post well&#8230;then i have posted it on my web site, just follow the link above.)</p>
<p>i found a much easier solution to allow for showing and hiding of comments on the main index page.</p>
<p><code>&lt;script language=&quot;Javascript 1.2&quot;<br />
type=&quot;text/javascript&quot;&gt;<br />
function show(id)<br />
{<br />
	el = document.getElementById(id);<br />
	if (el.style.display == &apos;none&apos;)<br />
	{<br />
		el.style.display = &apos;&apos;;<br />
		el = document.getElementById(&apos;more&apos; + id);<br />
	} else {<br />
		el.style.display = &apos;none&apos;;<br />
		el = document.getElementById(&apos;more&apos; + id);<br />
	}<br />
}<br />
&lt;/script&gt;<br />
</code></p>
<p>so put that in the header.php or wherever your head tags are&#8212;that is, between the &lt;head&gt; tag.</p>
<p>second you need to edit the link for the comments and have a div tag containing the actual comment information.</p>
<p>so the link i use is this:<br />
<code>&lt;a href=&quot;javascript:show(&apos;vis-&lt;?php the_ID(); ?&gt;&apos;);&quot;&gt;&lt;?php comments_number(&apos;Comments (0)&apos;, &apos;Comments (1)&apos;, &apos;Comments (%)&apos;); ?&gt;&lt;/a&gt;</code></p>
<p>i use &#039;the_ID()&#034; tag so that way it doesn&#039;t confuse the browser and it validates the code.  this way, each comment is unique to the individual post.</p>
<p>the next thing to do is set up the div. </p>
<p><code>&lt;div align=&quot;left&quot; id=&quot;vis-&lt;?php the_ID(); ?&gt;&quot; style=&quot;display: none&quot;&gt;<br />
&lt;?php $withcomments = true; comments_template();?&gt;<br />
&lt;/div&gt;<br />
</code><br />
that&#039;s it!  you don&#039;t need a plug-in&#8230;unless you don&#039;t know how to edit the files in wordpress&#8230;hrm.  maybe i should create a plug-in for the less code-adept.</p>
<p>the javascript is a less than tweaked version of tom mcmillen&#039;s code found here: <a href="http://lists.evolt.org/archive/Week-of-Mon-20020624/116152.html" rel="nofollow">http://lists.evolt.org/archive/Week-of-Mon-20020624/116152.html</a></p>
<p>cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mihai Bocsaru</title>
		<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/comment-page-1/#comment-502853</link>
		<dc:creator>Mihai Bocsaru</dc:creator>
		<pubDate>Thu, 08 Mar 2007 19:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/#comment-502853</guid>
		<description>Hi Jennifer,

Nice conincidence! I was needing such a Show/Hide JavaScript solution just yesterday (March the 7th, 2007).

Arvind method is very good and straightforward. For my project very requirements I&#039;ve  ended up using your solution from here http://www.scriptygoddess.com/archives/2004/01/06/another-revision-to-the-showhide-script/

Thanks a lot,
Mihai Bocsaru</description>
		<content:encoded><![CDATA[<p>Hi Jennifer,</p>
<p>Nice conincidence! I was needing such a Show/Hide JavaScript solution just yesterday (March the 7th, 2007).</p>
<p>Arvind method is very good and straightforward. For my project very requirements I&#039;ve  ended up using your solution from here <a href="http://www.scriptygoddess.com/archives/2004/01/06/another-revision-to-the-showhide-script/" rel="nofollow">http://www.scriptygoddess.com/archives/2004/01/06/another-revision-to-the-showhide-script/</a></p>
<p>Thanks a lot,<br />
Mihai Bocsaru</p>
]]></content:encoded>
	</item>
</channel>
</rss>

