javascriptcssinternet-explorer-6

How can I implement a zoom function like the browser's CTRL +


I want a button that zoom in (increase font size is the main objective but images and tables etc is also wanted)


Solution

  • There is the zoom css3 property which does exactly this, the latest webkit browsers (chrome, safari) support it.

    edit: apparently even IE6 supports it in some way, check comments below

    setting the zoom css property on your body or container should to the trick. Could be as simple as $('body').css('zoom', '200%'); with jQuery.

    Check http://jsfiddle.net/Ks6Yn/1/ for an example