Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 773271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:56:17+00:00 2026-05-14T18:56:17+00:00

I have the three following lines and the first two line gets all the

  • 0

I have the three following lines and the first two line gets all the images on the document and hides all, but then when I add the third line shows all the images.

What I need its to hide only the images with the attribute alt=minimize and alt=maximize but for some reason hides all the images.

$('img').attr('alt', 'minimize').css("display","none");
$('img').attr('alt', 'maximize').css("display","none");


$('img').attr('alt', 'logo').css("display","inline");

I am using IE7, but it should be compatible with IE6 and IE8.

Any help would be very much appreciated.

Thanks.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:56:18+00:00Added an answer on May 14, 2026 at 6:56 pm

    I’m thinking you are not using the attr function correctly, might you be looking for the attribute equals selector?:

    $('img[alt=minimize]').css("display","none");
    

    What you did with your code was,

    1. Select all images
    2. Change their alt attribute to 'minimize'
    3. Hide them
    4. Select all images
    5. Change their alt attribute to 'maximize'
    6. Hide them
    7. Select all images
    8. Change their alt attribute to 'logo'
    9. Hide them
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following three items displayed side by side: <div class=page-header> <h1 style=line-height:0>Title</h1>
I have the following three arrays and need to create a new two-dimensional array
I have three mysql table from same database Db1. Three tables have following columns.
I have the following three files in the same directory: citysim.cpp #include utils.h using
I have the following three tables. I am trying to inter link (join) among
I have three tables of concern and a query which generates the following output
I have the following problem. I have three classes, A, B and C. A
Let's say I have the following three strings: (section1){stuff could be any character, i
In my project I have the following three interfaces, which are implemented by classes
I have three entities: Country, State and City with the following relationships: When creating

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.