Hola. ¿Hay alguna función en jQuery Mobile que reemplace attr()?, como por ejemplo vtrr();
Gracias de antemano
teoricamente attr sigue siendo attr en mobile, puedes mostrar donde te falla?
<script>
$(document).bind(function(){
if (window.matchMedia("(max-width: 600px)").matches){
$("#fondo").attr("style","background-image: url('imagenes/fondo_movil.jpg'); background-repeat:no-repeat; background-position: 0% 0%; background-attachment: fixed; background-size: 205% 205%;-webkit-background-size: 205% 205%; -moz-background-size:205% 205%; -o-background-size: 205% 205%; background-color:#F5ECCE;");
$("#address1").attr("style","bottom:5vmin; position:absolute; left:10%; font-size:9vw;")
//Cambiar el footer
$("#footer1").attr("style","width:202vw; height:230vh;");
//Cambiar el header
$("#header1").attr("style","width:130vw;");
$("#icons").attr("style","float:left;")
$(".light_sky").vclick(function(){
$.ajax({
type:'POST',
url:'functions.php',
data:'func=getEvents&date='+date,
success:function(html){
$('#event_list').html(html);
$('#event_list').slideDown('slow');
}
});
});
}
});
</script>
Este, es el código pero no se porque no me lo ejecuta
El script de jquery Mobile que implanté es el siguiente:
<script type="text/javascript" src="http://u1.linnk.it/qc8sbw/usr/apps/textsync/upload/jquery-mobile-touch.value.js"></script>
¿Es por el script?
Estas imlementando mal tu codigo. Deberias escuchar el evento ready de jquery, algo asi:
$(document).ready(function(){
/*... aca tu codigo ..*/
})
[quote author=nsigned link=topic=477978.msg2148615#msg2148615 date=1513001378]
Estas imlementando mal tu codigo. Deberias escuchar el evento ready de jquery, algo asi:
$(document).ready(function(){
/*... aca tu codigo ..*/
})
[/quote]
Hola, gracias por su atención pero me he informado que jQuery no se ejecuta en dispositivos móviles y era con jQuery Mobile cosa que se necesita poner $(document).bind()
y no $(document).ready()
, pero poniendo bind() no me ejecuta attr() cosa rara, porque teoricamente me tendría que ejecutar.
Yo creo que el error está en attr(), pero creo que no, y estoy pidiendo de vuestra ayuda, algunas conclusiones.
Gracias, por su atención.
Atentamente Drakaris.
Al final lo he solucionado, lo he separado.