<?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"
	>
<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>
	<pubDate>Fri, 08 Aug 2008 19:44:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Gio</title>
		<link>http://www.scriptygoddess.com/archives/2007/03/06/show-hide-javascript/#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'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&#8217;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-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'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;&#60;script language=&#34;Javascript 1.2&#34;
type=&#34;text/javascript&#34;&#62;
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);
	}
}
&#60;/script&#62;
&lt;/code&gt;

so put that in the header.php or wherever your head tags are---that is, between the &#60;head&#62; 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;&#60;a href=&#34;javascript:show(&apos;vis-&#60;?php the_ID(); ?&#62;&apos;);&#34;&#62;&#60;?php comments_number(&apos;Comments (0)&apos;, &apos;Comments (1)&apos;, &apos;Comments (%)&apos;); ?&#62;&#60;/a&#62;&lt;/code&gt;

i use 'the_ID()" tag so that way it doesn'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;&#60;div align=&#34;left&#34; id=&#34;vis-&#60;?php the_ID(); ?&#62;&#34; style=&#34;display: none&#34;&#62; 
&#60;?php $withcomments = true; comments_template();?&#62;
&#60;/div&#62;
&lt;/code&gt;
that's it!  you don't need a plug-in...unless you don'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's code found here: http://lists.evolt.org/archive/Week-of-Mon-20020624/116152.html

cheers.</description>
		<content:encoded><![CDATA[<p>(if this doesn&#8217;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 &#8216;the_ID()&#8221; tag so that way it doesn&#8217;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&#8217;s it!  you don&#8217;t need a plug-in&#8230;unless you don&#8217;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&#8217;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-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'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&#8217;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>

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