<?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: More Showing, More Hiding</title>
	<atom:link href="http://www.learningjquery.com/2007/02/more-showing-more-hiding/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Tue, 16 Mar 2010 15:31:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-3#comment-79757</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Mon, 01 Mar 2010 00:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79757</guid>
		<description>Hi KR. 
I definitely meant the double equals. That way, the function will return either true or false. Sure, send me a link, and I&#039;ll try to take a look.</description>
		<content:encoded><![CDATA[<p>Hi KR.<br />
I definitely meant the double equals. That way, the function will return either true or false. Sure, send me a link, and I&#8217;ll try to take a look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KR</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-3#comment-79755</link>
		<dc:creator>KR</dc:creator>
		<pubDate>Sun, 28 Feb 2010 21:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79755</guid>
		<description>Karl,

First of all, you are a saint for helping people like me who are new to JQuery!

I was wondering if you meant to include double == at the end of the code. When I added your code exactly as you advised it changed nothing. So I changed that to one = and now all of the sub menus display as expanded on all pages at all times. I have tried many things, including changing &#039;demo-show&#039; in your code to another name, but I either get nothing or all menus expanded. I am obviously doing something wrong.

I think I&#039;m going to email you a link to my test pages(s) because I don&#039;t want them floating around on the internet just yet. If it&#039;s something you can quickly look at I would appreciate it, but I TOTALLY understand if you don&#039;t have time to solve my problem. Thanks!</description>
		<content:encoded><![CDATA[<p>Karl,</p>
<p>First of all, you are a saint for helping people like me who are new to JQuery!</p>
<p>I was wondering if you meant to include double == at the end of the code. When I added your code exactly as you advised it changed nothing. So I changed that to one = and now all of the sub menus display as expanded on all pages at all times. I have tried many things, including changing &#8216;demo-show&#8217; in your code to another name, but I either get nothing or all menus expanded. I am obviously doing something wrong.</p>
<p>I think I&#8217;m going to email you a link to my test pages(s) because I don&#8217;t want them floating around on the internet just yet. If it&#8217;s something you can quickly look at I would appreciate it, but I TOTALLY understand if you don&#8217;t have time to solve my problem. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-3#comment-79752</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Sun, 28 Feb 2010 01:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79752</guid>
		<description>HI KR,

Typically in that situation, you would match up an id or class of the expanded categories with the current URL. Here is a really rough example, using classes similar to the ones in the entry:

&lt;pre&gt;&lt;code&gt;$(&#039;div.demo-show&#039;)
  .children(&#039;div&#039;).hide()
    .filter(function() {
      var filename = location.pathname.split(&#039;/&#039;).pop();
      filename = filename.split(&#039;.&#039;)[0];
      return this.id == filename;
    }).show();&lt;/code&gt;&lt;/pre&gt;

Notice that I used a filter function. The function returns only the div that has an id matching the file name of the current page, without an extension such as .html or .php. Of course, if your site has pretty URLs with no extension, you wouldn&#039;t need the &lt;code&gt;filename = filename.split(&#039;.&#039;)[0];&lt;/code&gt; line.</description>
		<content:encoded><![CDATA[<p>HI KR,</p>
<p>Typically in that situation, you would match up an id or class of the expanded categories with the current URL. Here is a really rough example, using classes similar to the ones in the entry:</p>
<pre><code>$('div.demo-show')
  .children('div').hide()
    .filter(function() {
      var filename = location.pathname.split('/').pop();
      filename = filename.split('.')[0];
      return this.id == filename;
    }).show();</code></pre>
<p>Notice that I used a filter function. The function returns only the div that has an id matching the file name of the current page, without an extension such as .html or .php. Of course, if your site has pretty URLs with no extension, you wouldn&#8217;t need the <code>filename = filename.split('.')[0];</code> line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KR</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-3#comment-79740</link>
		<dc:creator>KR</dc:creator>
		<pubDate>Thu, 25 Feb 2010 03:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79740</guid>
		<description>I&#039;m newish to JS but this tutorial was great. 

One question though that I have seen asked before but I can&#039;t find an answer to. Is there a way to have one of the headings expanded (showing its sub-menu items) when the user clicks to another page? For example...

I click on &quot;Contact&quot; and it expands to show 3 sub categories. I click on one of those categories and am taken to the appropriate page. When I reach the new page, I would like &quot;Contact&quot; to be expanded showing its 3 sub categories below it.

In other words, I don&#039;t want to have to keep clicking &quot;Contact&quot; to expand it once I am on one of the contact pages.

Hope that makes sense - Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;m newish to JS but this tutorial was great. </p>
<p>One question though that I have seen asked before but I can&#8217;t find an answer to. Is there a way to have one of the headings expanded (showing its sub-menu items) when the user clicks to another page? For example&#8230;</p>
<p>I click on &#8220;Contact&#8221; and it expands to show 3 sub categories. I click on one of those categories and am taken to the appropriate page. When I reach the new page, I would like &#8220;Contact&#8221; to be expanded showing its 3 sub categories below it.</p>
<p>In other words, I don&#8217;t want to have to keep clicking &#8220;Contact&#8221; to expand it once I am on one of the contact pages.</p>
<p>Hope that makes sense &#8211; Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vesper Lynd</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-3#comment-79678</link>
		<dc:creator>Vesper Lynd</dc:creator>
		<pubDate>Sun, 07 Feb 2010 16:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79678</guid>
		<description>Hi,

I&#039;m using the independent show/hide toggle method for the FAQ on this page:

&lt;a href=&quot;http://www.buttecommunitybankproperties.com/resources/faq.php&quot; rel=&quot;nofollow&quot;&gt;http://www.buttecommunitybankproperties.com/resources/faq.php&lt;/a&gt;

I would like to add Show All / Hide All links to the top and bottom of the FAQ that will show and hide all answers at once. I&#039;m stumped. Can anyone help?

Great tutorial. Many thanks.
Vesper</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m using the independent show/hide toggle method for the FAQ on this page:</p>
<p><a href="http://www.buttecommunitybankproperties.com/resources/faq.php" rel="nofollow">http://www.buttecommunitybankproperties.com/resources/faq.php</a></p>
<p>I would like to add Show All / Hide All links to the top and bottom of the FAQ that will show and hide all answers at once. I&#8217;m stumped. Can anyone help?</p>
<p>Great tutorial. Many thanks.<br />
Vesper</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-2#comment-79647</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Fri, 29 Jan 2010 18:07:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79647</guid>
		<description>You can set the cursor style with CSS. For example:

&lt;pre&gt;&lt;code&gt;h3 {
  cursor: pointer;
}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>You can set the cursor style with CSS. For example:</p>
<pre><code>h3 {
  cursor: pointer;
}
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marshall</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-2#comment-79645</link>
		<dc:creator>Marshall</dc:creator>
		<pubDate>Fri, 29 Jan 2010 04:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79645</guid>
		<description>Hey Karl,
I figured parts of it out.

I&#039;m still lost on how to get the show/hide text to act like a link.

The example here on LearningJQuery, when you place the cursor over the &quot;Title 1&quot; the cusor icon changes to resemble the same cursor icon that appears when a normal link is hovered (the little hand).

When the text on my page &quot;Show/Hide&quot; is hovered with the mouse the cursor changes to the typical Text Icon. I&#039;m afraid that the cursor not changing people will assume the text is not clickable.</description>
		<content:encoded><![CDATA[<p>Hey Karl,<br />
I figured parts of it out.</p>
<p>I&#8217;m still lost on how to get the show/hide text to act like a link.</p>
<p>The example here on LearningJQuery, when you place the cursor over the &#8220;Title 1&#8243; the cusor icon changes to resemble the same cursor icon that appears when a normal link is hovered (the little hand).</p>
<p>When the text on my page &#8220;Show/Hide&#8221; is hovered with the mouse the cursor changes to the typical Text Icon. I&#8217;m afraid that the cursor not changing people will assume the text is not clickable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Swedberg</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-2#comment-79643</link>
		<dc:creator>Karl Swedberg</dc:creator>
		<pubDate>Fri, 29 Jan 2010 00:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79643</guid>
		<description>Hi Marshall, 

It looks like you&#039;ve figured it out. At least, it looked like it was working when I checked it out.</description>
		<content:encoded><![CDATA[<p>Hi Marshall, </p>
<p>It looks like you&#8217;ve figured it out. At least, it looked like it was working when I checked it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marshall</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-2#comment-79624</link>
		<dc:creator>Marshall</dc:creator>
		<pubDate>Mon, 25 Jan 2010 15:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79624</guid>
		<description>Really Need Help Please.
I&#039;m a newbie when it comes to jQuery. LearningJQuery.com has been a real help in educating me in the wonders of jQuery.

But, I&#039;m lost trying to implement this Hide/Show in a new design.
example http://youthofsuburbia.com/showhidetest.php

For some reason only the first divwrap is being effected (hiding the child div)
And &quot;Show&quot; (tagged with H3) is not making the hidden div visible. It&#039;s not even clickable.

the HideShow file is located here http://youthofsuburbia.com/javascript/more-show-hide.js
I made some changes to it. Hope that&#039;s not whats breaking it. But I assume since one div is being hidden on load then its working some what, just not sure where the bugs are coming from.

Thank you for any help.</description>
		<content:encoded><![CDATA[<p>Really Need Help Please.<br />
I&#8217;m a newbie when it comes to jQuery. LearningJQuery.com has been a real help in educating me in the wonders of jQuery.</p>
<p>But, I&#8217;m lost trying to implement this Hide/Show in a new design.<br />
example <a href="http://youthofsuburbia.com/showhidetest.php" rel="nofollow">http://youthofsuburbia.com/showhidetest.php</a></p>
<p>For some reason only the first divwrap is being effected (hiding the child div)<br />
And &#8220;Show&#8221; (tagged with H3) is not making the hidden div visible. It&#8217;s not even clickable.</p>
<p>the HideShow file is located here <a href="http://youthofsuburbia.com/javascript/more-show-hide.js" rel="nofollow">http://youthofsuburbia.com/javascript/more-show-hide.js</a><br />
I made some changes to it. Hope that&#8217;s not whats breaking it. But I assume since one div is being hidden on load then its working some what, just not sure where the bugs are coming from.</p>
<p>Thank you for any help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.learningjquery.com/2007/02/more-showing-more-hiding/comment-page-2#comment-79544</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 13 Jan 2010 00:17:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/2007/02/more-showing-more-hiding#comment-79544</guid>
		<description>I noticed I was getting a bit of a jump in my animation - just before the inner div was completely revealed (at maybe 80% visibility).

I added a height via CSS to the inner div and it smoothed things out.

My question - is there a way to dynamically check/adjust inner div height via jQuery so I won&#039;t have to have a set height in the CSS. Basically, check what the height will be and then adjust the animation so the jump doesn&#039;t happen.

To say I&#039;m a jQuery beginner is an understatement so forgive me if this is ridiculous.  :)</description>
		<content:encoded><![CDATA[<p>I noticed I was getting a bit of a jump in my animation &#8211; just before the inner div was completely revealed (at maybe 80% visibility).</p>
<p>I added a height via CSS to the inner div and it smoothed things out.</p>
<p>My question &#8211; is there a way to dynamically check/adjust inner div height via jQuery so I won&#8217;t have to have a set height in the CSS. Basically, check what the height will be and then adjust the animation so the jump doesn&#8217;t happen.</p>
<p>To say I&#8217;m a jQuery beginner is an understatement so forgive me if this is ridiculous.  :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
