Hi,
here is a font size changer that changes font size for all elements procentual, it also saves
the state of choosen fontsize into a cookie.
You can setup the default size and the procentual adjustment steps for in or decreasing.
Here we go:Place in your header.html
between <head></head> tag:
<script type="text/javascript" src="./js/font_cookie.js"></script>
<script type="text/javascript" src="./js/font_size.js"></script>
Place early in your header.html
after the <body> tag:
<script type="text/javascript">if (efa_fontSize) efa_fontSize.efaInit();</script>
Place this in any template where you want to show the font size changer buttons:
<div class="selectFontSize"><script type="text/javascript">if (efa_fontSize) document.write(efa_fontSize.allLinks);</script></div>
Place the attached files (see post attachment) into your root/js/ directory:
- root/js/font_size.js
- root/jsfont_cookie.js
- root/js/font_zoomin_32.png
- root/js/font_normal_32.png
- root/jsfont_zoomout_32.png
Your done
Settings:in font_size.js:
var efa_default = 70; //default text size as percentage of user default
var efa_increment = 10; //percentage to increase/decrease font size
You can play around with this two settings.
In the attachment there is also a font_size.html file, this only for local testing and is not
needed for uploading.
Here is a little teaser screenshot snip, don't wonder i just placed it for testing into my
mac like dock bar:
Greetz X23