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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:48:02+00:00 2026-06-15T15:48:02+00:00

I am looking for a way to change the back ground image on toggle

  • 0

I am looking for a way to change the back ground image on toggle as in this questions here:

jQuery – Toggle Image Expand/Close

My issue is I have this html:

<button id="close-menu"></button>
<div id="menu-bar">
<div class="wrapper">
    <a href="http://www.website.com" target="_blank">
        <img src="image.png" alt="">
    </a>
    <div class="options">
        <h2>eBlast Tools</h2>
        <ul>
            <li class="toggle-images">Images are <span>enabled</span>. Click to disable.</li>
            <li class="download-zip"><a href="download.zip">Download ZIP File</a></li>
        </ul>
    </div>
</div>
</div>

and this is my current jquery:

$('#close-menu').click(function() {
    $('#menu-bar').slideToggle(400);
    return false;
});

and this is the css:

#close-menu {
background: url(../img/minus-button.png);
background-position: top left;
width: 25px;
height: 25px;
position: absolute;
top: 10px;
right: 20px;
z-index: 100;
border: none;
}

#close-menu:hover {
background: url(../img/minus-button.png);
background-position: bottom left;
}
  • 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-15T15:48:04+00:00Added an answer on June 15, 2026 at 3:48 pm

    Assuming you want the background of close-menu to change – try something like this:

    $('#close-menu').click(function() {
        $('#menu-bar').slideToggle(400, function(){
            if($(this).is(':visible')){
                $('#close-menu').css('background-position','bottom left');
            } else {
                $('#close-menu').css('background-position','top left');
            }
        });
    
        return false;
    });
    

    In response to your comment – you would be better off to create some css like this:

    .minus { background: url(../img/minus-button.png) top left no-repeat; }
    .minus:hover { background-position: bottom left; }
    
    .plus { background: url(../img/plus-button.png) top left no-repeat; }
    .plus:hover { background-position: bottom left; }
    

    Add the class of minus to close-menu and then do:

    $('#close-menu').click(function() {
        $('#menu-bar').slideToggle(400, function(){
            $('#close-menu').toggleClass('minus');
            $('#close-menu').toggleClass('plus');
        });
    
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a way to have a div background image change when the
Im looking for a way to change the background image of a div using
I have been looking everywhere on here and Google, but I still have this
I've been looking around for a way to change the background image of my
I have been looking on the net for some way to change the look
I'm looking for a way to change a color's tone, knowing it's RGB composition,
I am looking for a way to change the value of the DisplayName attribute
I'm looking for a way how to change URL in browsers address bar. For
Hi I'm looking but can't see Is there a way to change the caption
I'm looking for the best way to change the backgroundColor of an NSView .

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.