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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:26:50+00:00 2026-06-10T02:26:50+00:00

I’m trying to create a jQuery effect for this block . The idea is,

  • 0

I’m trying to create a jQuery effect for this block.
The idea is, that on mouseover the other photos are “looking” at the selected one. Here is the html code.

<ul class="team">
    <li><img src="pics/team/t-0001.jpg" alt=""/></li>
    <li><img src="pics/team/t-0002.jpg" alt=""/></li>
    <li><img src="pics/team/t-0003.jpg" alt=""/></li>
    ...
</ul>

Theoretically I understand, that when the mouse is over one of these li elements, I have to change the src value of images in the others. And there are several arrays needed where these paths can be stored.

But in practice I have big problems.

What should I do first? May be there are some examples or plugins?

I will appreciate any help.


Thank you for help! Sorry, could not answer earlier, had a lot of work to do.

I have found a solution. It is very simple and not so flexible, but it works. I’m using background images.

Here is the example http://jsfiddle.net/KSYUC/4/

  • 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-10T02:26:52+00:00Added an answer on June 10, 2026 at 2:26 am

    One way you could simplify the problem, by not having 9 images of each person, is to actually work with one composite image per person, with all possibilities.
    Maybe something like this (the arrow shows the direction in which the person should be looking) in one single image:

    Face direction

    This lets you alter the direction just by changing the background position (using the regular intervals that are determined by your image size) of the image through CSS.
    It also has the benefit that all possibilities for a face are loaded at the same time, and not when the face changes (which may cause the image to flicker or require preloading).

    Then you’d have to calculate which image to use for each face, depending its relative location to the selected one.
    It’s a matter of arithmetic comparison between coordinates.

    So if you iterate all faces against the selected one, then if the current’s Y is higher than the selected Y, then it’ll be one of the top three “sub-images”, and then you’d compare X to see if it is less, equal, or greater, to determine which one of the three.
    The same applies to all three rows of possible faces.
    Ultimately it boils down to comparing both Y and X for less, equal, or greater. That way you’d calculate the offset for both X and Y in the background position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

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.