Hi all,
When you double-tap on a div in a web-page, safari automatically zomm
in order to make this div fit into the iphone screen.
Next, when you double-tap on the body, it zoom-out you and you get the
whole page displayed...
So I would like to use this functionality to automatically zoom into a
div when I want.
For exemple I'd like to make safari zoom into a div just with 1 tap.
Does anyone have some idea ?
I tried this kind of things to simulate a double-tap but it doesn't
work :
var evObj = document.createEvent('MouseEvents');
evObj.initEvent( 'touchend', true, true );
document.body.dispatchEvent(evObj);
setTimeout(function ()
{document.getElementById('myDIV').dispatchEvent(evObj);}, 10);
I've seen an other solution :
http://homepage.mac.com/jorgechamorro/cljs/076/
But this one use the webkit transform propertie to resize the element.
I want to use safari's zoom because it's really faster and smooth !
thanks a lot !
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.