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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:37:52+00:00 2026-06-04T03:37:52+00:00

<div class=banner> <div class=banner_wrapper> <div class=banner_image> <img class=banner_img src=banner-pic1.png /> </div> <div class=banner_bottom_wrapper> <div

  • 0
 <div class="banner">
        <div class="banner_wrapper">
            <div class="banner_image">
                <img class="banner_img" src="banner-pic1.png" />                        
            </div>
            <div class="banner_bottom_wrapper">
                <div class="banner_phrase">
                    <img src="banner-text.png"/>
                </div><!-- banner_phrase ENDS -->
                <div class="banner_btns">
                   <ul class="btn_list">
                       <li><img class="banner_btn" src="banner-btn-not-selected.png" /></li>
                       <li><img class="banner_btn" src="banner-btn-not-selected.png" /></li>
                       <li><img class="banner_btn" src="banner-btn-not-selected.png" /></li>
                       <li><img class="banner_btn" src="banner-btn-not-selected.png" /></li>
                   </ul>
                </div><!-- banner_btns ENDS -->
            </div><!-- banner_bottom_wrapper ENDS -->
        </div><!-- banner_btns ENDS -->
    </div><!-- banner ENDS -->

This is my source code I’m currently working on. If a mouse cursor is on one of 4 buttons then its picture changes to a color-filled icon image and banner image on the top must change to something different. Yup, it’s a typical image slider.

The problem is I’ve been working on it with Javascript and people told me that Jquery is way better… but for me the way Jquery works is still very confusing after going through bunch of tutorials :S

            $('.banner_btn').mouseover(
                function btn_on() {
                    //Set all the btn imgs to 'off'
                    $(".btn_list li").each(function() {$('.btn_list li img').attr('src','banner-btn-not-selected.png');
                    //And set the selected button img to 'on'
                    $(this).attr('src','banner-btn-selected.png');
                    //Now......  How to know #th btn is clicked? D:  Accroding to the btn selected, I should change the banner image.


                });                     
            });

I need your help, Gurus :'(

  • 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-04T03:37:54+00:00Added an answer on June 4, 2026 at 3:37 am
    $(".btn_list li").each(function() {
       $('img', this).attr('src', 'banner-btn-selected.png');
    });
    

    Aggregate,

    $('.banner_btn').on('mouseover', function() {
        $(".btn_list li").each(function() {
           $('img', this).attr('src', 'banner-btn-not-selected.png'); // changes all images src to default
        });
        this.src = 'banner-btn-selected.png'; // change the hovered image src
    });
    

    Another way you can achieve you goal

     $('.banner_btn').on(
       'hover', 
       function() {
          this.src = 'banner-btn-selected.png';
       }, 
       function(){
          this.src = 'banner-btn-not-selected.png';
       });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML: <div id=overlay_weekPrize> <div class=prizePopupBanner> </div> <div id=weeklyPrizeImageBanner><!--the big banner images/weeklyPrizeImageBanner--> <div id=week1><img src=images/bts/bts_overlay_weekly_prize_week1.png
<div class = a> <div class = a b> text </div> </div> <script> alert($(.a).html());
I'm trying to add a class to each div.banner inside of my #destaques, but
I have the following element in my page: <div id=banner class=disappear>Hello</div> The CSS for
My code is as below. Html Portion <div id=div_video> <div class=div_vol> <a href=# onclick=sound_adjustment()><img
I have html structure like below: <div id=banner-menu-holder> <div> <div class=avalible> <div class=items-holder> <div>
I want to scale the picture to fit the main div class http://jsfiddle.net/EyW99/ Sorry,
I have something like this currently: <div class = className style = position: absolute;
My div with class name 'header-body-right' doesn't seem to be floating to the left
Let's say I do something stupid like this: <div class=my_class>fun wee!!</div> <span class=my_class><b class=my_class>Title</b></span>

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.