Skip to content

Instantly share code, notes, and snippets.

@cron64
Created April 29, 2013 22:10
Show Gist options
  • Save cron64/5485208 to your computer and use it in GitHub Desktop.
Save cron64/5485208 to your computer and use it in GitHub Desktop.
DETECTAR ANCHO
var ancho;
if (document.body)
ancho = (document.body.clientWidth);
else
ancho = (window.innerWidth);
if (ancho<=768)
{
//Código de ejemplo...
$("#contenido img").attr("src","../imagenes/bg-info-768.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment