<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Newbie Seeks Javascript</title>
	<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript/</link>
	<description>Comments on Ask MetaFilter post Newbie Seeks Javascript</description>
	<pubDate>Sat, 29 Mar 2008 17:18:59 -0800</pubDate>
	<lastBuildDate>Sat, 29 Mar 2008 17:18:59 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Newbie Seeks Javascript</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript</link>	
		<description>I want to build a web page with expandable sections of text which default to not being expanded. Unfortunately, I&apos;m a total javascript newbie. The way they did it here is pretty close to what I&apos;d want (scroll to &quot;anatomical focus&quot;): http://www.yogajournal.com/poses/863  ....Is it possible (or, for that matter, ethical) to somehow grab the javascript they used? Alternatively, are there generic freeware scripts anywhere that do something similar? If there were any such repository with a variety of javascripts that do this slightly different ways, even better. If it&apos;s newbie friendly, even better still! Thanks!
</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.87364</guid>
		<pubDate>Sat, 29 Mar 2008 17:06:40 -0800</pubDate>
		<dc:creator>jimmyjimjim</dc:creator>
		
			<category>javascript</category>
		
			<category>web</category>
		
			<category>text</category>
		
	</item> <item>
		<title>By: belladonna</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287946</link>	
		<description>What you want is an &lt;a href=&quot;http://tutorialblog.org/10-javascript-accordion-scripts/&quot;&gt;accordion script&lt;/a&gt;. There are lots of free ones on that page. They&apos;ll all have instructions, I think.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287946</guid>
		<pubDate>Sat, 29 Mar 2008 17:18:59 -0800</pubDate>
		<dc:creator>belladonna</dc:creator>
	</item><item>
		<title>By: jimmyjimjim</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287958</link>	
		<description>Wow, thanks. Funny how in this age of web search, knowing the name of something is the most critical thing. We&apos;re in the Rumpelstiltskin Era....</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287958</guid>
		<pubDate>Sat, 29 Mar 2008 17:33:32 -0800</pubDate>
		<dc:creator>jimmyjimjim</dc:creator>
	</item><item>
		<title>By: jimmyjimjim</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287961</link>	
		<description>A good link (for anyone reading along): http://aariadne.com/accordion</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287961</guid>
		<pubDate>Sat, 29 Mar 2008 17:35:32 -0800</pubDate>
		<dc:creator>jimmyjimjim</dc:creator>
	</item><item>
		<title>By: jimmyjimjim</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287972</link>	
		<description>Hmm. The problem is that just about all these scripts hide any shown text when showing other text. I want users to be able to show/hide different sections at their whim, or be able to simply hit a &quot;show all&quot; button (as in the example URL).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287972</guid>
		<pubDate>Sat, 29 Mar 2008 17:46:01 -0800</pubDate>
		<dc:creator>jimmyjimjim</dc:creator>
	</item><item>
		<title>By: jimmyjimjim</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287973</link>	
		<description>also, I&apos;m hoping for plain javascript, not requiring other frameworks or libraries.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287973</guid>
		<pubDate>Sat, 29 Mar 2008 17:48:09 -0800</pubDate>
		<dc:creator>jimmyjimjim</dc:creator>
	</item><item>
		<title>By: belladonna</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287997</link>	
		<description>Like one of these? &lt;a href=&quot;http://www.webdeveloper.com/forum/archive/index.php/t-161705.html&quot;&gt;one&lt;/a&gt; | &lt;a href=&quot;http://www.ilovephp.org/tutorials.php?tutorial=4&quot;&gt;two&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
I&apos;m not sure how those compare to the &lt;a href=&quot;http://www.yogajournal.com/js/lib.js&quot;&gt;script&lt;/a&gt; yogajournal is using. You could compare them if you want. (Look for &quot;/* show and hide elements on poses page */&quot; to find the relevant part.) I don&apos;t recommend just copying their code, but you can certainly learn from it. :)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287997</guid>
		<pubDate>Sat, 29 Mar 2008 18:47:44 -0800</pubDate>
		<dc:creator>belladonna</dc:creator>
	</item><item>
		<title>By: cschneid</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1287998</link>	
		<description>If you don&apos;t mind not having fancy animation, this is an increibly easy script to write.&lt;br&gt;
&lt;br&gt;
You have a link which has an onclick event.  That would look like &lt;br&gt;
&lt;code&gt;&lt;br&gt;
[a href=&quot;#&quot; onclick=&quot;show(&apos;div1&apos;);&quot;]Show the hidden div![/a]&lt;br&gt;
[div id=&apos;div1&apos; style=&apos;display: none&apos;]My hidden text[/div]&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
The components there are the link.  It doesn&apos;t go anywhere, but it does call the &quot;show&quot; function, with the name of the div it should show.&lt;br&gt;
&lt;br&gt;
The div1 div is hidden by default (display: none), so it starts out invisible.&lt;br&gt;
&lt;br&gt;
The last component is the show() function.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
[script type=&quot;text/javascript&quot;]&lt;br&gt;
function show(id) {&lt;br&gt;
  var elem = document.getElementById(id);&lt;br&gt;
  if (! elem) return;&lt;br&gt;
  elem.style.display = &apos;block&apos;;&lt;br&gt;
}&lt;br&gt;
[/script]&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
That doesn&apos;t toggle, or change any other elements (like the arrow in the example site).  I can add those for you if you like, but it would probably work best over email so I can type script code without messing up the formatting.  Also note, it very well might not work as typed, as I just did that off the top of my head.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1287998</guid>
		<pubDate>Sat, 29 Mar 2008 18:49:49 -0800</pubDate>
		<dc:creator>cschneid</dc:creator>
	</item><item>
		<title>By: anomie</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1288005</link>	
		<description>Why not use a library? This is the spot where &lt;a href=&quot;http://www.jquery.com&quot;&gt;jQuery&lt;/a&gt; shines:&lt;br&gt;
&lt;br&gt;
first the base html:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&amp;lt;div class=&quot;outer&quot;&amp;gt;&lt;br&gt;
&#160;&#160;&amp;lt;h3&amp;gt; Section Heading &amp;lt;/h3&amp;gt;&lt;br&gt;
&#160;&#160;&amp;lt;a href=&quot;#&quot; class=&quot;expand-link&quot;&amp;gt;&lt;br&gt;
  &#160;&#160;&amp;lt;img src=&quot;expand.gif&quot;/&amp;gt;&lt;br&gt;
&#160;&#160;&amp;lt;/a&amp;gt;&lt;br&gt;
&#160;&#160;&amp;lt;div class=&quot;hidden-text&amp;gt;&lt;br&gt;
&#160;&#160;&#160;&#160;put stuff here you want to hide&lt;br&gt;
&#160;&#160;&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
and the javascript:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br&gt;
$(function(){&lt;br&gt;
&#160;&#160;$(&apos;a.expand-link&apos;).click(function(){&lt;br&gt;
&#160;&#160;&#160;&#160;$(this).next(&apos;div.hidden-text&apos;).toggle();&lt;br&gt;
&#160;&#160;}&lt;br&gt;
}&lt;br&gt;
&amp;lt;/script&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
This doesn&apos;t change the image though, mefimail me if you&apos;re interested.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1288005</guid>
		<pubDate>Sat, 29 Mar 2008 19:07:05 -0800</pubDate>
		<dc:creator>anomie</dc:creator>
	</item><item>
		<title>By: anomie</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1288008</link>	
		<description>&lt;code&gt;&lt;br&gt;
&amp;lt;div class=&quot;hidden-text&amp;gt;&lt;/code&gt;&lt;br&gt;
should be&lt;code&gt;&lt;br&gt;
&amp;lt;div class=&quot;hidden-text&quot;&amp;gt;&lt;br&gt;
&lt;/code&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1288008</guid>
		<pubDate>Sat, 29 Mar 2008 19:09:26 -0800</pubDate>
		<dc:creator>anomie</dc:creator>
	</item><item>
		<title>By: mmoncur</title>
		<link>http://ask.metafilter.com/87364/Newbie-Seeks-Javascript#1288163</link>	
		<description>Here&apos;s a &lt;a href=&quot;http://www.jsworkshop.com/js3e/list23-1.html&quot;&gt;Super simple example&lt;/a&gt; from a book I wrote. You have my permission to steal it.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.87364-1288163</guid>
		<pubDate>Sat, 29 Mar 2008 22:44:25 -0800</pubDate>
		<dc:creator>mmoncur</dc:creator>
	</item>
	</channel>
</rss>
