Font resizing using jQuery

Font Resizing is a very common feature in many modern websites. This can be done very easily with jQuery. The following script uses cookies to save the user preference, so the user preference is saved. jQuery Cookie plugin is used for managing cookie using jQuery. So include that too.

the html for increase, decrease links

<div>
	<a href="javascript:void decreaseFont();" class="font-smaller" title="Reduce font size">-</a>
	<a href="javascript:void normalFont();" class="font-normal" title="Normal font size">0</a> 
	<a href="javascript:void increaseFont();" class="font-bigger" title="Increase font size">+</a>
</div>

Add the following code just before the tag.


You may also like...

1 Response

  1. The information is hugely nice. I am recurrently a wordless reader but forced me to draft this time. splendid post.

Leave a Reply

Your email address will not be published. Required fields are marked *