Bonjour,
J'ai réalisé quelques lignes de codes et le tout ne fonctionne pas.
J'ai un objet jQuery contenant plusieurs éléments (visible par le biais de .length).
Je souhaiterai accéder a certaines propriété de chacun d'eux. J'ai testé le monobjet.height() malheureusement, j'obtiens une belle erreur.
Voila mon code :
Merci, fef ![/i][/i][/i][/i][/i][/i]
Modifié par iFef (07 Sep 2011 - 23:48)
J'ai réalisé quelques lignes de codes et le tout ne fonctionne pas.
J'ai un objet jQuery contenant plusieurs éléments (visible par le biais de .length).
Je souhaiterai accéder a certaines propriété de chacun d'eux. J'ai testé le monobjet.height() malheureusement, j'obtiens une belle erreur.
Voila mon code :
$('#containerGridMode').css('backgroundPositionY','bottom');
var nbppc=$('#column1 .previewArticle').length;
var p1=$('#column1 .previewArticle');
var p2=$('#column2 .previewArticle');
var p3=$('#column3 .previewArticle');
for(i=0;i<nbppc;i++)
{
var height1=p1[i].height();
var height2=p2[i].height();
var height3=p3[i].height();
var maxHeight=math.max(height1,height2,height3);
p1[i].css('marginBottom',25+maxHeight-height1);
p2[i].css('marginBottom',25+maxHeight-height2);
p3[i].css('marginBottom',25+maxHeight-height3);
}
Merci, fef ![/i][/i][/i][/i][/i][/i]
Modifié par iFef (07 Sep 2011 - 23:48)