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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:35:46+00:00 2026-05-23T08:35:46+00:00

I have a div containing list items, a photo, and a plus/minus icon at

  • 0

I have a div containing list items, a photo, and a plus/minus icon at the bottom of the div.

The list items are absolutely positioned behind the photo. When I click on the plus button I want it to change to minus and animate the photo 29px from the top revealing the list-items behind it. Then I want to click the minus button changing it back to plus and animate the photo back up to the top.

I’m trying to accomplish something very similar to what you see on Kyanmedia.com. Except their images animate down and up on hover. I want my image to animate down then up on click and toggle the plus/minus image. I’ve tried this but it doesn’t work.

$(document).ready(function() {
  $('#btn_switch').click(function () {

        $(this).addClass('on')
        $('.photo').animate({ top: '29px'}, 500);

        }, function() {
        $(this).removeClass('on')
        $('.photo').animate({ top: '0px'}, 500);

    });
});
  • 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-05-23T08:35:47+00:00Added an answer on May 23, 2026 at 8:35 am

    You should use “toggle” instead of click():

    $(document).ready(function() { $('#btn_switch').toggle(
        function () { /*show*/ },
        function () { /*hide*/ }
    );});
    

    http://api.jquery.com/toggle-event/

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

Sidebar

Related Questions

I have a scrolling div containing list items. I have this boilerplate scroll event
I have a menu with list items whose ID is associated to a div,
I have a list of form-field divs inside a containing div. <div id=container> <div
I have a <div> that has a list of items being load() ed into
I have div containing a list of flash objects. The list is long so
Suppose I have a container containing a list of items, so the markup looks
Hey so I have a list, with some of the items containing other lists.
I have a div containing a form. I use that div as a dialog
I have a DIV containing an image and a second DIV. The parent DIV
So I have a Div containing an iframe that I can Clone using JQuery.

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.