To improve the user-experience for older Users, who do not know all the functions and shortcuts of their browser, I would like to have a button which simply triggers Ctrl++ (plus-button) to zoom in and improve the readability.
- Is this possible?
- How?
- Is there a solution for Mac-users who do have an other button for Strg?
Edit: Seems like I could use the zoom property in CSS3.
I just tried:
function mzi(){
var oldval = document.getElementById('zoom').style.zoom;
var newval = Number(oldval) + 0.1;
alert('old value is '+Number(oldval)+' and new value is '+newval+'.');
document.getElementById('zoom').style.zoom = Number(oldval) + 0.1;
};
And it almost does what I want.
The problem:
It sets the zoom to 0.1 and not to "oldval + 0.1".
So the problem seems to be somewhere around the variable "oldval".
Maybe I cant store the value correctly or I cant use it correctly?
The alert says old value is 0 and new value is 0.1