2

Can I get the can zoom in/out Firefox/Chrome-like effect using jQuery with no other plugin?

If so, how?

alex
  • 479,566
  • 201
  • 878
  • 984
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378
  • Could you clarify what you mean by "zoom?" Are you referring to the effects of `Ctrl +` and `Ctrl -`? – Matt Ball Mar 02 '11 at 00:44
  • This currently cannot be done. See: http://stackoverflow.com/questions/2578354/access-browsers-page-zoom-controls-with-javascript – Luke Dennis Mar 02 '11 at 00:45

1 Answers1

9
var currentZoom = 1;
$('button').click(function() {
    currentZoom += 0.1;
    $('body').css({
        zoom: currentZoom,
        '-moz-transform': 'scale(' + currentZoom + ')'
    });
});

jsFiddle.

alex
  • 479,566
  • 201
  • 878
  • 984
  • With jquery.transform.js you can enable cross browser transform https://github.com/louisremi/jquery.transform.js – molokoloco Jul 10 '11 at 14:16