Foro de elhacker.net

Programación => Desarrollo Web => Mensaje iniciado por: Drakaris en 10 Diciembre 2017, 00:47 am



Título: Cuando utilizo $(document).bind(),¿Que medidas css tomar?
Publicado por: Drakaris en 10 Diciembre 2017, 00:47 am
Hola, estoy haciendo una web responsive y hice una función jQuery y en el móvil no me funcionaba, pero ya lo arreglé, tuve que pone
Código:
$(document).bind()
, y
Código:
$().vclick()
, la función va bien en el móvil pero hay otras funciones para moviles que no funcionan, y son porque no se ejecutan, y creo que es por los tipos de medidas css que utilizan que són: %,vmin,vmax,vh,wv,% pero no funcionan y probé con px peo tampoco, y yo me preguntaba que medida css tomar.

Código:
  $(document).bind(function(){
    if (window.matchMedia("(max-width: 600px)").matches){
       fondo12 = document.getElementById("fondo");
       fondo12.setAttribute("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;");
      address4 = document.getElementById("address1");
      address4.setAttribute("style","bottom:5vmin; position:absolute; left:10%; font-size:9vw;");
      //Cambiar el footer
      foot = document.getElementById("footer1");
      foot.setAttribute("style","width:202vw; height:230vh;");
      //Cambiar el header
      header12 = document.getElementById("header1");
      header12.setAttribute("style","width:130vw;");
      equipo123 = document.getElementById("icons");
      equipo123.setAttribute("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');
            }
          });
        });
    }
  });

gracias de antemano