<?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 and Hide a div using jQuery</title>
	<atom:link href="http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/</link>
	<description>ASP.NET &#38; MVC Developer and Web Host</description>
	<lastBuildDate>Sat, 06 Aug 2011 14:40:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Mac Gyver Yoingco</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-486</link>
		<dc:creator>Mac Gyver Yoingco</dc:creator>
		<pubDate>Tue, 01 Feb 2011 05:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-486</guid>
		<description>will you please help me?..
i want to show a hidden div using jquery..
after showing the hidden div..
i need to hide an input type that value is &quot;save&quot;
then another input type &quot;save1&quot; will appear thanks..</description>
		<content:encoded><![CDATA[<p>will you please help me?..<br />
i want to show a hidden div using jquery..<br />
after showing the hidden div..<br />
i need to hide an input type that value is &#8220;save&#8221;<br />
then another input type &#8220;save1&#8243; will appear thanks..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-472</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 22:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-472</guid>
		<description>Sorry Simon, 
a part of message seems to have been deleted, it probably contained too many dangerous tags or brackets:-)
I wrote that I&#039;ve put __ div id=&quot;hideafterclick&quot; __ in front of the section containing the tag, between brackets of course, I haven&#039;t defined the div in any other way. And then I put the slash div at the end of that section.
I hope it makes enough sense for you to verify if I dind&#039;t make any mistakes!

Thomas</description>
		<content:encoded><![CDATA[<p>Sorry Simon,<br />
a part of message seems to have been deleted, it probably contained too many dangerous tags or brackets:-)<br />
I wrote that I&#8217;ve put __ div id=&#8221;hideafterclick&#8221; __ in front of the section containing the tag, between brackets of course, I haven&#8217;t defined the div in any other way. And then I put the slash div at the end of that section.<br />
I hope it makes enough sense for you to verify if I dind&#8217;t make any mistakes!</p>
<p>Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-471</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 22:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-471</guid>
		<description>Simon,
I&#039;ve put  in front of (the section containing) the tag, and a  at the end. I assume that&#039;s all it takes to make it into a div? I haven&#039;t typed anything else.
Then I tried to put $(‘#hideafterclick’).hide(); can you confirm that the syntax is correct?

So then the code reads:

        $(document).ready(function () {
            $(&#039;#showhidetarget&#039;).hide();

            $(&#039;a#showhidetrigger&#039;).click(function () {
                $(&#039;#showhidetarget&#039;).show(200);
                $(‘#hideafterclick’).hide();

            });
        });
    

It still doesn&#039;t work, i.e. the target is still showing.
So IF you can confirm me that my code is &quot;as good as it gets&quot; and doesn&#039;t contain any syntax errors or missplacements, THEN we can decide that this simply doesn&#039;t work. Would be a real pity, I was so close!

Kind regards,

Thomas</description>
		<content:encoded><![CDATA[<p>Simon,<br />
I&#8217;ve put  in front of (the section containing) the tag, and a  at the end. I assume that&#8217;s all it takes to make it into a div? I haven&#8217;t typed anything else.<br />
Then I tried to put $(‘#hideafterclick’).hide(); can you confirm that the syntax is correct?</p>
<p>So then the code reads:</p>
<p>        $(document).ready(function () {<br />
            $(&#8216;#showhidetarget&#8217;).hide();</p>
<p>            $(&#8216;a#showhidetrigger&#8217;).click(function () {<br />
                $(&#8216;#showhidetarget&#8217;).show(200);<br />
                $(‘#hideafterclick’).hide();</p>
<p>            });<br />
        });</p>
<p>It still doesn&#8217;t work, i.e. the target is still showing.<br />
So IF you can confirm me that my code is &#8220;as good as it gets&#8221; and doesn&#8217;t contain any syntax errors or missplacements, THEN we can decide that this simply doesn&#8217;t work. Would be a real pity, I was so close!</p>
<p>Kind regards,</p>
<p>Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Holman</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-470</link>
		<dc:creator>Simon Holman</dc:creator>
		<pubDate>Wed, 19 Jan 2011 22:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-470</guid>
		<description>Thomas

It may be because an a tag is an inline element, not a block element so it can&#039;t hide it. You&#039;d have to check the jQuery documentation.

Perhaps put a div around the show/hide a tag, give it an id and try to hide the div rather than the a tag.

Simon</description>
		<content:encoded><![CDATA[<p>Thomas</p>
<p>It may be because an a tag is an inline element, not a block element so it can&#8217;t hide it. You&#8217;d have to check the jQuery documentation.</p>
<p>Perhaps put a div around the show/hide a tag, give it an id and try to hide the div rather than the a tag.</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-469</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 21:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-469</guid>
		<description>Dear Simon,
I&#039;ve tried putting your line $(‘a#showhidetrigger’).hide(); on a couple of places, but it doesn&#039;t seem to work. The target is now no longer hidden when the page is loaded. Did I missplace your code?
This is how I&#039;ve tried it, maybe this can help you to help me:


        $(document).ready(function () {
            $(&#039;#showhidetarget&#039;).hide();

            $(&#039;a#showhidetrigger&#039;).click(function () {
                $(&#039;#showhidetarget&#039;).show(200);
                $(‘a#showhidetrigger’).hide();
            });
        });
    

Thanks in advance,

Thomas</description>
		<content:encoded><![CDATA[<p>Dear Simon,<br />
I&#8217;ve tried putting your line $(‘a#showhidetrigger’).hide(); on a couple of places, but it doesn&#8217;t seem to work. The target is now no longer hidden when the page is loaded. Did I missplace your code?<br />
This is how I&#8217;ve tried it, maybe this can help you to help me:</p>
<p>        $(document).ready(function () {<br />
            $(&#8216;#showhidetarget&#8217;).hide();</p>
<p>            $(&#8216;a#showhidetrigger&#8217;).click(function () {<br />
                $(&#8216;#showhidetarget&#8217;).show(200);<br />
                $(‘a#showhidetrigger’).hide();<br />
            });<br />
        });</p>
<p>Thanks in advance,</p>
<p>Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-468</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 21:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-468</guid>
		<description>Simon,
Wow, what a fast reply, thanks a lot! Like I said, I&#039;m a complete novice, so I&#039;ll give it a try. At first glance, everything looks like Chinese to me. But when looking closer, I think I understand your reply, and actually your suggestion to modify &#039;toggle&#039; into &#039;show&#039; makes sense, and it&#039;s not a problem at all, I prefer it that way. Now all I have to do is figure out WHERE exactly to put your code :-)
I&#039;ll give it a try, and I will let you know in a couple of minutes!
Kind regards,
Thomas</description>
		<content:encoded><![CDATA[<p>Simon,<br />
Wow, what a fast reply, thanks a lot! Like I said, I&#8217;m a complete novice, so I&#8217;ll give it a try. At first glance, everything looks like Chinese to me. But when looking closer, I think I understand your reply, and actually your suggestion to modify &#8216;toggle&#8217; into &#8216;show&#8217; makes sense, and it&#8217;s not a problem at all, I prefer it that way. Now all I have to do is figure out WHERE exactly to put your code <img src='http://simon-holman.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
I&#8217;ll give it a try, and I will let you know in a couple of minutes!<br />
Kind regards,<br />
Thomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Holman</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-467</link>
		<dc:creator>Simon Holman</dc:creator>
		<pubDate>Wed, 19 Jan 2011 20:51:55 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-467</guid>
		<description>Thomas

You should be able to use $(&#039;a#showhidetrigger&#039;).hide(); in the click function but then you&#039;d lose the ability to toggle so you might as well change the $(&#039;#showhidetarget&#039;).toggle(400); to $(&#039;#showhidetarget&#039;).show();

Simon</description>
		<content:encoded><![CDATA[<p>Thomas</p>
<p>You should be able to use $(&#8216;a#showhidetrigger&#8217;).hide(); in the click function but then you&#8217;d lose the ability to toggle so you might as well change the $(&#8216;#showhidetarget&#8217;).toggle(400); to $(&#8216;#showhidetarget&#8217;).show();</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-466</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 20:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-466</guid>
		<description>I am completely new to everything webdesign and jsquery, and I still managed to make it work, so thanks a lot, this is great!. 
However, I still have a question: I would like to &#039;hide&#039; the initial link as soon as it is clicked.
So in other words, the initially visible text (show/hide in your example) should be hidden when it is clicked. How should I go about this?

Thanks in advance,
Thomas (Belgium)</description>
		<content:encoded><![CDATA[<p>I am completely new to everything webdesign and jsquery, and I still managed to make it work, so thanks a lot, this is great!.<br />
However, I still have a question: I would like to &#8216;hide&#8217; the initial link as soon as it is clicked.<br />
So in other words, the initially visible text (show/hide in your example) should be hidden when it is clicked. How should I go about this?</p>
<p>Thanks in advance,<br />
Thomas (Belgium)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MockY</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-248</link>
		<dc:creator>MockY</dc:creator>
		<pubDate>Fri, 23 Jul 2010 23:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-248</guid>
		<description>Works like a charm. Easy to implement. Thanks.</description>
		<content:encoded><![CDATA[<p>Works like a charm. Easy to implement. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sumit Thapar</title>
		<link>http://simon-holman.net/2010/03/show-and-hide-a-div-using-jquery/comment-page-1/#comment-246</link>
		<dc:creator>Sumit Thapar</dc:creator>
		<pubDate>Wed, 07 Jul 2010 10:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://wordpress.simon-holman.net/?p=16#comment-246</guid>
		<description>tHANK YOU SIR.....it was really a simple and very nice article .</description>
		<content:encoded><![CDATA[<p>tHANK YOU SIR&#8230;..it was really a simple and very nice article .</p>
]]></content:encoded>
	</item>
</channel>
</rss>

