lunes, 17 de febrero de 2014

Solution jQueryMobile viewport tag

If we use the jQueryMobile library, it may not work the viewport tag
Si usamos la librería jQueryMobile es muy posible que tengamos problemas para que nos funcione la etiqueta viewport
<html>
<head>
...
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
...
</head>
<body>
...
</body>
It has very easy solution. First step to remove the label.
Bueno por suerte tiene muy fácil solución. Primer paso eliminar la etiqueta.
Second step, add an instruction using javascript with jquery.
Segundo paso, añadimos mediante una instrucción javascript con jquery.
jQuery(document).bind('mobileinit', function(){
        jQuery.mobile.metaViewportContent = 'width=device-width, minimum-scale=1, maximum-scale=2';
});
With this statement, we can zoom in on our mobile device.
Con esta instrucción, podremos hacer zoom en nuestro dispositivo movil.

No hay comentarios:

Publicar un comentario