Atadj
Atadj

Reputation: 7200

Script to zoom out iPhone's viewport?

Is there any script to zoom out iPhone's viewport in Safari to initial scale = 1.0 upon clicking on some HTML element?

Like:

jQuery('#element').click(function(){
    //scale is set to default, 1.0 here (it zooms out as much as possible)
});

Upvotes: 0

Views: 631

Answers (1)

Ido Green
Ido Green

Reputation: 2813

Something like that:

-webkit-transform: scale(1.0);

will do what you are asking for. However, you need to check that you didn't prevent the user from scaling on click/drag like most mobile web app are doing.

Upvotes: 1

Related Questions