<?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: Guest Post: change text size onclick with JavaScript</title>
	<atom:link href="http://eriwen.com/javascript/change-text-size-onclick-with-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:49:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Jessica</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-7406</link>
		<dc:creator>Jessica</dc:creator>
		<pubDate>Fri, 04 Nov 2011 01:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-7406</guid>
		<description>I&#039;m curious if something like this would work with what I&#039;m trying to do. I&#039;ve created a simple audio player for a website. When I click on the song/link, I&#039;d like for text in another part of the page (the corner where the player is) to change to the currently playing song. I don&#039;t need anything fancy and I&#039;m not a crazy smart programmer, but it seems like something like an onClick function might be my option. Does this sound about right? 

To put it simply, all I need is for when a link is clicked, text to change elsewhere on the page. For some reason, I cannot find help on this ANYWHERE! Can you help in anyway?? 

Thanks!
-Jess</description>
		<content:encoded><![CDATA[<p>I&#8217;m curious if something like this would work with what I&#8217;m trying to do. I&#8217;ve created a simple audio player for a website. When I click on the song/link, I&#8217;d like for text in another part of the page (the corner where the player is) to change to the currently playing song. I don&#8217;t need anything fancy and I&#8217;m not a crazy smart programmer, but it seems like something like an onClick function might be my option. Does this sound about right? </p>
<p>To put it simply, all I need is for when a link is clicked, text to change elsewhere on the page. For some reason, I cannot find help on this ANYWHERE! Can you help in anyway?? </p>
<p>Thanks!<br />
-Jess</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Smitts</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5434</link>
		<dc:creator>Jim Smitts</dc:creator>
		<pubDate>Tue, 15 Feb 2011 14:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5434</guid>
		<description>This is beautiful, something I&#039;ve always figured there must be an easy way to do. This will help with the &lt;a href=&quot;http://www.eztexting.com/index.php&quot; rel=&quot;nofollow&quot;&gt;text marketing&lt;/a&gt; sites that I&#039;m working -- flash is great and all, but text is imperative for accessibility. Thanks!</description>
		<content:encoded><![CDATA[<p>This is beautiful, something I&#8217;ve always figured there must be an easy way to do. This will help with the <a href="http://www.eztexting.com/index.php" rel="nofollow">text marketing</a> sites that I&#8217;m working &#8212; flash is great and all, but text is imperative for accessibility. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5423</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Wed, 09 Feb 2011 14:52:27 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5423</guid>
		<description>Ideally, you have your HTML structured such that you have a main content area and the sidebar with links within different containers. If that is true, all you need to do is change references to &lt;code&gt;document.body&lt;/code&gt; to &lt;code&gt;document.getElementById(&#039;foo&#039;)&lt;/code&gt; etc.</description>
		<content:encoded><![CDATA[<p>Ideally, you have your HTML structured such that you have a main content area and the sidebar with links within different containers. If that is true, all you need to do is change references to <code>document.body</code> to <code>document.getElementById('foo')</code> etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5421</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Wed, 09 Feb 2011 11:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5421</guid>
		<description>Love the script, is there a way to stop it working on certain element? I have side links I do not want to enlarge, Similar to your demo site.

Thanks</description>
		<content:encoded><![CDATA[<p>Love the script, is there a way to stop it working on certain element? I have side links I do not want to enlarge, Similar to your demo site.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5416</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Fri, 28 Jan 2011 15:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-5416</guid>
		<description>Add this after the first if test to only allow enlarging 3 times:
&lt;code&gt;else if (document.body.style.fontSize &gt;= 1 + (multiplier * 6)) {
return
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Add this after the first if test to only allow enlarging 3 times:<br />
<code>else if (document.body.style.fontSize >= 1 + (multiplier * 6)) {<br />
return<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bassam</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-4176</link>
		<dc:creator>Bassam</dc:creator>
		<pubDate>Thu, 02 Dec 2010 18:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-4176</guid>
		<description>Hello. After the user has enlarged the text a certain number of times (i.e. 3 times), what code is required to stop the user from enlarging it any further?</description>
		<content:encoded><![CDATA[<p>Hello. After the user has enlarged the text a certain number of times (i.e. 3 times), what code is required to stop the user from enlarging it any further?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-3334</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Wed, 07 Jul 2010 22:57:52 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-3334</guid>
		<description>The Cookie functionality requires MooTools, though you could certainly write your own. Don&#039;t forget the attach click events as well.</description>
		<content:encoded><![CDATA[<p>The Cookie functionality requires MooTools, though you could certainly write your own. Don&#8217;t forget the attach click events as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas White</title>
		<link>http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-3333</link>
		<dc:creator>Thomas White</dc:creator>
		<pubDate>Tue, 29 Jun 2010 03:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/javascript/change-text-size-onclick-with-javascript/#comment-3333</guid>
		<description>I tried your coding to make my resume website text go bigger on click however it did not work.

Can you explain to me what I am doing wrong?  I put the script coding in the 
&lt;code&gt;
      function resizeText(multiplier) {
        var fontsz = &quot;1.0em&quot;; //Default to 1em
        if (Cookie.read(&#039;site_font_size&#039;)) {
          // Set fontsz to the cookie value if it exists
          fontsz = Cookie.read(&#039;site_font_size&#039;);
        }
        fontsz = parseFloat(fontsz) + (multiplier * 0.2) + &quot;em&quot;;
        // Change body text size
        document.body.style.fontSize = fontsz;
        
        //Set a new cookie 
        var myCookie = Cookie.write(&#039;site_font_size&#039;, fontsz, {
          domain: &#039;eriwen.com&#039;,
          duration: 365 //Save for 1 year
        });
      }
 &lt;/code&gt;

and I put this coding in the links. Is there something else that I am suppose to do?

Please advise. Thank you.</description>
		<content:encoded><![CDATA[<p>I tried your coding to make my resume website text go bigger on click however it did not work.</p>
<p>Can you explain to me what I am doing wrong?  I put the script coding in the<br />
<code><br />
      function resizeText(multiplier) {<br />
        var fontsz = "1.0em"; //Default to 1em<br />
        if (Cookie.read('site_font_size')) {<br />
          // Set fontsz to the cookie value if it exists<br />
          fontsz = Cookie.read('site_font_size');<br />
        }<br />
        fontsz = parseFloat(fontsz) + (multiplier * 0.2) + "em";<br />
        // Change body text size<br />
        document.body.style.fontSize = fontsz;</p>
<p>        //Set a new cookie<br />
        var myCookie = Cookie.write('site_font_size', fontsz, {<br />
          domain: 'eriwen.com',<br />
          duration: 365 //Save for 1 year<br />
        });<br />
      }<br />
 </code></p>
<p>and I put this coding in the links. Is there something else that I am suppose to do?</p>
<p>Please advise. Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

