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 7713625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:55:09+00:00 2026-06-01T01:55:09+00:00

My website has a main image that changes depending on what thumbnails you click

  • 0

My website has a main image that changes depending on what thumbnails you click on. For a certain main picture, I want text specific to that image to populate. The text starts out as display:none; and then I have it revealed with .show();. Nothing seems to be happening with my code, so any help would be much appreciated. The jquery is:

$(document).ready(function() {
jQuery.fn.exists = function() {
    return this.length > 0;
};
if ($("div.bigimage a[href*='karina']").exists()) {
    $("ul li.karina").show();
    $("ul li.natalia").hide();
    $("ul li.celeste").hide();
}
else if ($("div.bigimage a[href*='natalia']").exists()) {
    $("ul li.karina").hide();
    $("ul li.natalia").show();
    $("ul li.celeste").hide();
}
else if ($("div.bigimage a[href*='celeste']").exists()) {
    $("ul li.karina").hide();
    $("ul li.natalia").hide();
    $("ul li.celeste").show();
}
else {
    $("ul li.karina").hide();
    $("ul li.natalia").hide();
    $("ul li.celeste").hide();
}

});​

the html it is trying to select is:

​<div class="bigimage">
<li>
<a href="http://cdn.shopify.com/s/files/1/0103/5102/products/Natalia_1024x1024_IMG_5760.jpg?4679">picture here</a></li>
</div>

<ul>
<li id="model-name" class="karina">Karina is 5'7" and is wearing a size 34 C/D Regular</li>
            <li id="model-name" class="celeste">Celeste is 5'8" and is wearing a size 34 C/D Regular</li>
            <li id="model-name" class="natalia">Natalia is 5'10" and is wearing a size 34 A/B Tall</li>
</ul>​​​​​​
  • 1 1 Answer
  • 0 Views
  • 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-06-01T01:55:10+00:00Added an answer on June 1, 2026 at 1:55 am

    Your problem is a result of case sensitivity: you are looking for natalia but the link url contains Natalia. There is also a much shorter way to write your code:

    $("ul li").hide(); // hide all
    var url = $("div.bigimage a")[0].href;
    if (url.indexOf("Karina") > -1) {
        $("ul li.karina").show();
    }
    else if (url.indexOf("Natalia") > -1) {
        $("ul li.natalia").show();
    }
    else if (url.indexOf("Celeste") > -1 ) {
        $("ul li.celeste").show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My website has an Atom feed and I want to make it easier to
Our website has one section which often changes to match the user. (examples are
My employers website has multiple hostnames that all hit the same server and we
I have a website that has a voting poll module. A poll controller accepts
I'm working on a website that has a file management portion where users can
I have a .NET powered website, that has a sign-up box form already. I'm
I am fixing up a friends website, and he has an advertisement that takes
My website has been giving me intermittent errors when trying to perform any Ajax
my website has a log in by open id feature. When a user logs
My website has a setup whereby when the application starts a module called SiteContent

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.