attributes - jquery .attr('alt','logo').css('display','none') not working ! -
i have 3 following lines , first 2 line gets images on document , hides all, when add third line shows images.
what need hide images attribute alt=minimize , alt=maximize reason hides images.
$('img').attr('alt', 'minimize').css("display","none"); $('img').attr('alt', 'maximize').css("display","none"); $('img').attr('alt', 'logo').css("display","inline");
i using ie7, should compatible ie6 , ie8.
any appreciated.
thanks.
i'm thinking not using attr function correctly, might looking attribute equals selector?:
$('img[alt=minimize]').css("display","none");
what did code was,
- select images
- change alt attribute
'minimize'
- hide them
- select images
- change alt attribute
'maximize'
- hide them
- select images
- change alt attribute
'logo'
- hide them
Comments
Post a Comment