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,

  1. select images
  2. change alt attribute 'minimize'
  3. hide them
  4. select images
  5. change alt attribute 'maximize'
  6. hide them
  7. select images
  8. change alt attribute 'logo'
  9. hide them

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -