Skip to content

Instantly share code, notes, and snippets.

@Serabe
Created November 12, 2012 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Serabe/4060833 to your computer and use it in GitHub Desktop.
Save Serabe/4060833 to your computer and use it in GitHub Desktop.
/**
* PARA CARGAR ATRIBUTO TITLE ALT EN LAS IM�?GENES DE LOS DESTACADOS DE LA HOME
*/
function cargar_atr_destacados(){
var alt1= $('#img_destacados1 img').eq(0).attr('alt');
var alt2= $('#img_destacados2 img').eq(0).attr('alt');
var alt3= $('#img_destacados3 img').eq(0).attr('alt');
var alt4= $('#img_destacados4 img').eq(0).attr('alt');
var alt5= $('#img_destacados5 img').eq(0).attr('alt');
$('#img_destacados1 img').eq(0).attr('title',alt1);
$('#img_destacados1 img').eq(1).attr('alt', alt1);
$('#img_destacados1 img').eq(1).attr('title',alt1);
$('#img_destacados1 img').eq(2).attr('alt',alt1);
$('#img_destacados1 img').eq(2).attr('title',alt1);
$('#img_destacados2 img').eq(0).attr('title',alt2);
$('#img_destacados2 img').eq(1).attr('alt', alt2);
$('#img_destacados2 img').eq(1).attr('title',alt2);
$('#img_destacados2 img').eq(2).attr('alt',alt2);
$('#img_destacados2 img').eq(2).attr('title',alt2);
$('#img_destacados3 img').eq(0).attr('title',alt3);
$('#img_destacados3 img').eq(1).attr('alt', alt3);
$('#img_destacados3 img').eq(1).attr('title',alt3);
$('#img_destacados3 img').eq(2).attr('alt',alt3);
$('#img_destacados3 img').eq(2).attr('title',alt3);
$('#img_destacados4 img').eq(0).attr('title',alt4);
$('#img_destacados4 img').eq(1).attr('alt', alt4);
$('#img_destacados4 img').eq(1).attr('title',alt4);
$('#img_destacados4 img').eq(2).attr('alt',alt4);
$('#img_destacados4 img').eq(2).attr('title',alt4);
$('#img_destacados5 img').eq(0).attr('title',alt5);
$('#img_destacados5 img').eq(1).attr('alt', alt5);
$('#img_destacados5 img').eq(1).attr('title',alt5);
$('#img_destacados5 img').eq(2).attr('alt',alt5);
$('#img_destacados5 img').eq(2).attr('title',alt5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment