<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Javascript - text resize with cookie</title>
	<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/</link>
	<description>My little place from infinity</description>
	<pubDate>Mon, 21 May 2012 11:51:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: Zen Zoomie</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-62</link>
		<author>Zen Zoomie</author>
		<pubDate>Mon, 16 Jul 2007 00:52:10 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-62</guid>
					<description>Hi Nick, have you been successful in integrating this type of capability into a WordPress blog?  Any chance you could give us a demo on your next post?</description>
		<content:encoded><![CDATA[<p>Hi Nick, have you been successful in integrating this type of capability into a WordPress blog?  Any chance you could give us a demo on your next post?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-63</link>
		<author>nicusor</author>
		<pubDate>Mon, 16 Jul 2007 07:06:28 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-63</guid>
					<description>Before doing that, I searched and I found that there is already such a &lt;a href="http://wordpress.org/extend/plugins/wp-chgfontsize/" target="_blank" rel="nofollow"&gt;plugin for wordpress&lt;/a&gt;. 

I looked over the code and it use cookies too. If it's not working let me know and I'll make a plugin out of mine... :)</description>
		<content:encoded><![CDATA[<p>Before doing that, I searched and I found that there is already such a <a href="http://wordpress.org/extend/plugins/wp-chgfontsize/" target="_blank" rel="nofollow">plugin for wordpress</a>. </p>
<p>I looked over the code and it use cookies too. If it&#8217;s not working let me know and I&#8217;ll make a plugin out of mine&#8230; <img src='http://nicusor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Marco</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-331</link>
		<author>Marco</author>
		<pubDate>Sat, 08 Dec 2007 13:02:44 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-331</guid>
					<description>Hey Nick,

You seem to be a pro at text-size cookies, and I was wondering if you might be able to help me out. I'm using a similar script to yours, except, it is cookieless. Is there any way you might be able to show me how to enable them?

Thanks a lot, I really appreciate your help on this- it's been driving me bananas :)

Here's the code:

var tags = new Array( 'div','td','tr','p','b','table','strong','emphasis','a','h1','h2','h3','pre','sub','sup','i','th','cp','ul','ol','li','dt','dd');
var pixelArray =  new Array('10','12','16','20','24','30','40');
var emArray =  new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
var initSize = 0;

function fontSizer(inc,unit) {
	if (!document.getElementById) 
		return;
	var size = initSize;
		size += inc;
	if (size  6 ) {
		size = 6;
}
		initSize = size;
		getBody = document.getElementsByTagName('body')[0];
	for (i = 0 ; i </description>
		<content:encoded><![CDATA[<p>Hey Nick,</p>
<p>You seem to be a pro at text-size cookies, and I was wondering if you might be able to help me out. I&#8217;m using a similar script to yours, except, it is cookieless. Is there any way you might be able to show me how to enable them?</p>
<p>Thanks a lot, I really appreciate your help on this- it&#8217;s been driving me bananas <img src='http://nicusor.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s the code:</p>
<p>var tags = new Array( &#8216;div&#8217;,'td&#8217;,'tr&#8217;,'p&#8217;,'b&#8217;,'table&#8217;,&#8217;strong&#8217;,'emphasis&#8217;,'a&#8217;,'h1&#8242;,&#8217;h2&#8242;,&#8217;h3&#8242;,&#8217;pre&#8217;,&#8217;sub&#8217;,&#8217;sup&#8217;,'i&#8217;,'th&#8217;,'cp&#8217;,'ul&#8217;,'ol&#8217;,'li&#8217;,'dt&#8217;,'dd&#8217;);<br />
var pixelArray =  new Array(&#8217;10&#8242;,&#8217;12&#8242;,&#8217;16&#8242;,&#8217;20&#8242;,&#8217;24&#8242;,&#8217;30&#8242;,&#8217;40&#8242;);<br />
var emArray =  new Array(&#8217;0.7&#8242;,&#8217;0.9&#8242;,&#8217;1.0&#8242;,&#8217;1.5&#8242;,&#8217;2.0&#8242;,&#8217;2.5&#8242;,&#8217;3&#8242;);<br />
var initSize = 0;</p>
<p>function fontSizer(inc,unit) {<br />
	if (!document.getElementById)<br />
		return;<br />
	var size = initSize;<br />
		size += inc;<br />
	if (size  6 ) {<br />
		size = 6;<br />
}<br />
		initSize = size;<br />
		getBody = document.getElementsByTagName(&#8217;body&#8217;)[0];<br />
	for (i = 0 ; i</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-334</link>
		<author>nicusor</author>
		<pubDate>Sun, 09 Dec 2007 22:06:52 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-334</guid>
					<description>Here is the whole function:

function fontSizer(inc,unit) {
       if (!document.getElementById)
               return;
       var size = initSize;
       size += inc;
       if (size &lt; 0 ) {
               size = 0;
       }
       if (size &gt; 6 ) {
               size = 6;
       }
       initSize = size;
       getBody = document.getElementsByTagName('body')[0];
       for (i = 0 ; i &lt; tags.length ; i++ ) {
               getallTags = getBody.getElementsByTagName(tags[i]);
       for (k = 0 ; k &lt; getallTags.length ; k++)
               getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit : emArray[size]+unit;
       }
}

It seems to be fine - could you give me more details about your problem?</description>
		<content:encoded><![CDATA[<p>Here is the whole function:</p>
<p>function fontSizer(inc,unit) {<br />
       if (!document.getElementById)<br />
               return;<br />
       var size = initSize;<br />
       size += inc;<br />
       if (size < 0 ) {<br />
               size = 0;<br />
       }<br />
       if (size > 6 ) {<br />
               size = 6;<br />
       }<br />
       initSize = size;<br />
       getBody = document.getElementsByTagName(&#8217;body&#8217;)[0];<br />
       for (i = 0 ; i < tags.length ; i++ ) {<br />
               getallTags = getBody.getElementsByTagName(tags[i]);<br />
       for (k = 0 ; k < getallTags.length ; k++)<br />
               getallTags[k].style.fontSize = (unit==&#8217;px&#8217;) ? pixelArray[size]+unit : emArray[size]+unit;<br />
       }<br />
}</p>
<p>It seems to be fine - could you give me more details about your problem?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: marko</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-335</link>
		<author>marko</author>
		<pubDate>Sun, 09 Dec 2007 23:30:33 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-335</guid>
					<description>Hi Nico,

Thanks for completing my post. The problem with the aforementioned function is that it doesn't seem to create a cookie, so clicking any internal links resets the text-size. Would you know how to implement this feature? 

Thanks a ton for your help!!

Marco</description>
		<content:encoded><![CDATA[<p>Hi Nico,</p>
<p>Thanks for completing my post. The problem with the aforementioned function is that it doesn&#8217;t seem to create a cookie, so clicking any internal links resets the text-size. Would you know how to implement this feature? </p>
<p>Thanks a ton for your help!!</p>
<p>Marco</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-336</link>
		<author>nicusor</author>
		<pubDate>Mon, 10 Dec 2007 07:57:20 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-336</guid>
					<description>First you need to add those 2 cookies functions: createCookie &#038; readCookie. 
Then change this line:
var initSize = 0;

to:
var cookie = readCookie("initSize");
initSize = cookie ? cookie : 0;

And finally, in the body of fontSizer function, add after:
initSize = size;

this line:
createCookie("initSize", initSize, 365);

That should do it... let me know how it works!

Cheers,
Nick</description>
		<content:encoded><![CDATA[<p>First you need to add those 2 cookies functions: createCookie &#038; readCookie.<br />
Then change this line:<br />
var initSize = 0;</p>
<p>to:<br />
var cookie = readCookie(&#8221;initSize&#8221;);<br />
initSize = cookie ? cookie : 0;</p>
<p>And finally, in the body of fontSizer function, add after:<br />
initSize = size;</p>
<p>this line:<br />
createCookie(&#8221;initSize&#8221;, initSize, 365);</p>
<p>That should do it&#8230; let me know how it works!</p>
<p>Cheers,<br />
Nick</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Marco</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-337</link>
		<author>Marco</author>
		<pubDate>Mon, 10 Dec 2007 09:46:35 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-337</guid>
					<description>I tried the code you provided me with, but it doesn't seem to work- fontSizer doesn't seem to do anything and FIreFox Error Console spits out "fontSizer not defined". :( Any ideas? Thanks a lot for your help Nick!</description>
		<content:encoded><![CDATA[<p>I tried the code you provided me with, but it doesn&#8217;t seem to work- fontSizer doesn&#8217;t seem to do anything and FIreFox Error Console spits out &#8220;fontSizer not defined&#8221;. <img src='http://nicusor.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> Any ideas? Thanks a lot for your help Nick!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-341</link>
		<author>nicusor</author>
		<pubDate>Tue, 11 Dec 2007 08:31:26 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-341</guid>
					<description>Hey Marco,

Send me the file you are using so I can spot the problem...

Cheers,
Nick</description>
		<content:encoded><![CDATA[<p>Hey Marco,</p>
<p>Send me the file you are using so I can spot the problem&#8230;</p>
<p>Cheers,<br />
Nick</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Mike</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-555</link>
		<author>Mike</author>
		<pubDate>Tue, 18 Mar 2008 13:58:08 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-555</guid>
					<description>Sorry Nick, pls ignore my previous post. I can't get that script working on my site anyway.

What would be really cool would be a 'reset' button for your script.

Do you have the code for that?  :smile: 

Thanks again,
Mike</description>
		<content:encoded><![CDATA[<p>Sorry Nick, pls ignore my previous post. I can&#8217;t get that script working on my site anyway.</p>
<p>What would be really cool would be a &#8216;reset&#8217; button for your script.</p>
<p>Do you have the code for that?  <img src='http://nicusor.com/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p>
<p>Thanks again,<br />
Mike</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-556</link>
		<author>nicusor</author>
		<pubDate>Tue, 18 Mar 2008 20:33:45 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-556</guid>
					<description>Hey Mike, 

You can add another link like this:
&#60;a href="javascript:fsize(10,'px','content');" rel="nofollow"&gt;Reset&#60;/a&gt; or 
&#60;a href="#" onclick="fsize(10,'px','content');" rel="nofollow"&gt;Reset&#60;/a&gt;</description>
		<content:encoded><![CDATA[<p>Hey Mike, </p>
<p>You can add another link like this:<br />
&lt;a href=&#8221;javascript:fsize(10,&#8217;px&#8217;,'content&#8217;);&#8221; rel=&#8221;nofollow&#8221;>Reset&lt;/a> or<br />
&lt;a href=&#8221;#&#8221; onclick=&#8221;fsize(10,&#8217;px&#8217;,'content&#8217;);&#8221; rel=&#8221;nofollow&#8221;>Reset&lt;/a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: mike</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-557</link>
		<author>mike</author>
		<pubDate>Wed, 19 Mar 2008 10:01:48 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-557</guid>
					<description>Great. Thanks Nick!  :smile: 

Mike</description>
		<content:encoded><![CDATA[<p>Great. Thanks Nick!  <img src='http://nicusor.com/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </p>
<p>Mike</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: seo services india</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-990</link>
		<author>seo services india</author>
		<pubDate>Tue, 16 Sep 2008 09:03:26 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-990</guid>
					<description>Thanks to providing this code. i was waiting lot more time for this code. thanks again You have done such a wonderful job.
</description>
		<content:encoded><![CDATA[<p>Thanks to providing this code. i was waiting lot more time for this code. thanks again You have done such a wonderful job.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Mithra</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1496</link>
		<author>Mithra</author>
		<pubDate>Wed, 03 Jun 2009 10:48:10 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1496</guid>
					<description>I did not follow the 3rd step in your post. Also if the text is resized in 1 page, will the same setting be applicable to the rest of the pages in the site.Plz help.Thanks in advance.</description>
		<content:encoded><![CDATA[<p>I did not follow the 3rd step in your post. Also if the text is resized in 1 page, will the same setting be applicable to the rest of the pages in the site.Plz help.Thanks in advance.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1499</link>
		<author>nicusor</author>
		<pubDate>Wed, 03 Jun 2009 12:40:57 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1499</guid>
					<description>If you want the text to be resized in all the pages according to current page setting, you need to follow all 3 steps.</description>
		<content:encoded><![CDATA[<p>If you want the text to be resized in all the pages according to current page setting, you need to follow all 3 steps.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: chris</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1966</link>
		<author>chris</author>
		<pubDate>Mon, 16 Nov 2009 15:12:46 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1966</guid>
					<description>Hi 

Thanks for a great script.

I have a couple of questions if you could help.

1) I have used the reset code you suggested however when I go from one page to the next after clicking reset it remembers from the cookie the privouse setting.

2) is there a way of apply the font sizer to more than one div id?

Thanks for any help you can give and great code again.

Chris</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>Thanks for a great script.</p>
<p>I have a couple of questions if you could help.</p>
<p>1) I have used the reset code you suggested however when I go from one page to the next after clicking reset it remembers from the cookie the privouse setting.</p>
<p>2) is there a way of apply the font sizer to more than one div id?</p>
<p>Thanks for any help you can give and great code again.</p>
<p>Chris</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1967</link>
		<author>nicusor</author>
		<pubDate>Mon, 16 Nov 2009 16:14:43 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1967</guid>
					<description>Hi Chris,

1) Isn't it how it should work? I mean, just imagine that you set to a very large size, then hit resize and if no cookies are set, then you'll get the same large size on the next page - not pretty!

2) use the id of the parent of those different divs</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>1) Isn&#8217;t it how it should work? I mean, just imagine that you set to a very large size, then hit resize and if no cookies are set, then you&#8217;ll get the same large size on the next page - not pretty!</p>
<p>2) use the id of the parent of those different divs</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: chris</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1969</link>
		<author>chris</author>
		<pubDate>Tue, 17 Nov 2009 08:28:48 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1969</guid>
					<description>Hi

Sorry didn't explain myself very well. It does what you describe, when you hit the reset link it reduces the font but then when you go to the next page it is back up to the big font as the reset is not either removing or editing the cookie.

I don't think the reset is setting a cookie.

Thanks
Chris</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Sorry didn&#8217;t explain myself very well. It does what you describe, when you hit the reset link it reduces the font but then when you go to the next page it is back up to the big font as the reset is not either removing or editing the cookie.</p>
<p>I don&#8217;t think the reset is setting a cookie.</p>
<p>Thanks<br />
Chris</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1970</link>
		<author>nicusor</author>
		<pubDate>Tue, 17 Nov 2009 12:05:26 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1970</guid>
					<description>@Chris

I see - check again the post "Javascript - text resize" and you will find the correct way to set up the reset link.</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>I see - check again the post &#8220;Javascript - text resize&#8221; and you will find the correct way to set up the reset link.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: chris</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1992</link>
		<author>chris</author>
		<pubDate>Mon, 23 Nov 2009 10:07:32 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-1992</guid>
					<description>Thanks yes used the following and worked a treat I was missing the onclick!
Doh.

thanks again for your time.

&lt;a href="fsize(0.8,'em','mainbody');" rel="nofollow"&gt;reset&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Thanks yes used the following and worked a treat I was missing the onclick!<br />
Doh.</p>
<p>thanks again for your time.</p>
<p><a href="fsize(0.8,'em','mainbody');" rel="nofollow">reset</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Chris</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-2503</link>
		<author>Chris</author>
		<pubDate>Mon, 01 Mar 2010 15:37:27 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-2503</guid>
					<description>Useful code, I will be incorporating it into my websites!</description>
		<content:encoded><![CDATA[<p>Useful code, I will be incorporating it into my websites!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-3553</link>
		<author>Anonymous</author>
		<pubDate>Sun, 15 Aug 2010 00:29:55 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-3553</guid>
					<description>That's great code, but for those of you who use jquery, try out this code:

Javascript:

$(document).ready(function(){
  // Reset Font Size
  var originalFontSize = $('html').css('font-size');
    $(".resetFont").click(function(){
    $('html').css('font-size', originalFontSize);
  });
  // Increase Font Size
  $(".increaseFont").click(function(){
    var currentFontSize = $('html').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*1.2;
    $('html').css('font-size', newFontSize);
    return false;
  });
  // Decrease Font Size
  $(".decreaseFont").click(function(){
    var currentFontSize = $('html').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*0.8;
    $('html').css('font-size', newFontSize);
    return false;
  });
});</description>
		<content:encoded><![CDATA[<p>That&#8217;s great code, but for those of you who use jquery, try out this code:</p>
<p>Javascript:</p>
<p>$(document).ready(function(){<br />
  // Reset Font Size<br />
  var originalFontSize = $(&#8217;html&#8217;).css(&#8217;font-size&#8217;);<br />
    $(&#8221;.resetFont&#8221;).click(function(){<br />
    $(&#8217;html&#8217;).css(&#8217;font-size&#8217;, originalFontSize);<br />
  });<br />
  // Increase Font Size<br />
  $(&#8221;.increaseFont&#8221;).click(function(){<br />
    var currentFontSize = $(&#8217;html&#8217;).css(&#8217;font-size&#8217;);<br />
    var currentFontSizeNum = parseFloat(currentFontSize, 10);<br />
    var newFontSize = currentFontSizeNum*1.2;<br />
    $(&#8217;html&#8217;).css(&#8217;font-size&#8217;, newFontSize);<br />
    return false;<br />
  });<br />
  // Decrease Font Size<br />
  $(&#8221;.decreaseFont&#8221;).click(function(){<br />
    var currentFontSize = $(&#8217;html&#8217;).css(&#8217;font-size&#8217;);<br />
    var currentFontSizeNum = parseFloat(currentFontSize, 10);<br />
    var newFontSize = currentFontSizeNum*0.8;<br />
    $(&#8217;html&#8217;).css(&#8217;font-size&#8217;, newFontSize);<br />
    return false;<br />
  });<br />
});</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Frank</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-5597</link>
		<author>Frank</author>
		<pubDate>Sat, 09 Jul 2011 10:40:03 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-5597</guid>
					<description>Great script, and thanks a lot for putting it on the web. However, Google Chrome doesn't seem to accept or be able to work with the cookie? It resizes alright, but on the next page the size is back to the orginal size. Whereas in all other browsers the new font size is retained. The only thing I changed is px to em. 

Thanks in advance for your help, 
Frank</description>
		<content:encoded><![CDATA[<p>Great script, and thanks a lot for putting it on the web. However, Google Chrome doesn&#8217;t seem to accept or be able to work with the cookie? It resizes alright, but on the next page the size is back to the orginal size. Whereas in all other browsers the new font size is retained. The only thing I changed is px to em. </p>
<p>Thanks in advance for your help,<br />
Frank</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nicusor</title>
		<link>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-5599</link>
		<author>nicusor</author>
		<pubDate>Sat, 09 Jul 2011 20:07:15 +0000</pubDate>
		<guid>http://nicusor.com/programming-stuff/javascript-text-resize-with-cookie/#comment-5599</guid>
					<description>You should remove the path part from the createCookie function.</description>
		<content:encoded><![CDATA[<p>You should remove the path part from the createCookie function.</p>
]]></content:encoded>
				</item>
</channel>
</rss>

