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

  • Home
  • SEARCH
  • 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 7644339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:39:50+00:00 2026-05-31T09:39:50+00:00

Ive made a fiddle of my problem here. http://jsfiddle.net/E9cUS/1/ JavaScript: $(‘.top’).click(function () { var

  • 0

Ive made a fiddle of my problem here.

http://jsfiddle.net/E9cUS/1/

JavaScript:

$('.top').click(function () {
    var thisPage = $(this).closest('.yesNoItem');
    $('.yesNoTick').stop().animate({"opacity" : 1},400, function () {
        thisPage.find('.no .top').stop().animate({"opacity" : 0},400, function () {
            $(this).css("display", "none");
        });
    });
});

$('.yesNoNext').click(function () {
    $(this).closest('.yesNoItem').stop().animate({"opacity" : 0},400, function () {
        //This isnt working? Please advise?
        $(this).next('.yesNoItem').stop().animate({"opacity" : 1},400);
    });
});

HTML:

<div id="stage">
    <div class="yesNoOuter">

        <div class="yesNoItem" style="opacity:1;">
            <div class="yesNoContainer yes">
                <div class="top">
                    <div class="yesNoTick"></div>
                </div>
                <div class="bottom">
                </div>

            </div>
            <div class="yesNoContainer no">
                <div class="top">
                    <div class="yesNoTick"></div>
                </div>
                <div class="bottom">
                    <p>Text 1</p>
                    <div class="yesNoNext">More</span>
                </div>
            </div>
        </div>

        <div class="yesNoItem">
            <div class="yesNoContainer yes">
                <div class="top">
                    <div class="yesNoTick"></div>
                </div>
                <div class="bottom">
                </div>
            </div>
            <div class="yesNoContainer no">
                <div class="top">
                    <div class="yesNoTick"></div>
                </div>
                <div class="bottom">
                    <p>Text 2</p>
                    <div class="yesNoNext">More</span>
                </div>
            </div>
        </div>
    </div>
</div>

​

I’ve also put the line of code thats not working.

Bascially it is hiding the element that I want, but not fading the next one in…

Can any one advise based upon my code? Many thanks!

  • 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-31T09:39:51+00:00Added an answer on May 31, 2026 at 9:39 am

    I think your HTML got messed up. The second .yesNoItem element is not a sibling but a child of the first .yesNoItem element (right click -> inspect element).

    Probably because of <div class="yesNoNext">More</span> (opening div, closing span). The browser will attempt to correct this automatically and just ignore the closing span tag (at least this seems to be the case if you inspect the DOM).

    If you correct your HTML it should work (at least it should select the right element).

    If they are actually supposed to be nested, then .next() is the wrong method anyways.

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

Sidebar

Related Questions

I have made this fiddle: http://jsfiddle.net/4CtLV/ Now, what i'm trying to do, is if
I've got a dropdown I've made: http://jsfiddle.net/QPxVe/ For some reason, jsFiddle is altering the
http://jsfiddle.net/nicktheandroid/GPFxM/28/ I've also explained the situation in the JS Fiddle example. I binded hover
I want to skin a vb.net app I made ive googled some stuff and
I made an image to easier explain what Im after: Image Illustration http://bayimg.com/image/eabahaaci.jpg Ive
ASP.NET 4.0 Need some help with this vexing HTTP POST problem - I have
I've made a fiddle to explain my problem What i want is to slide
I've made a very simple fiddle here , and you can check it out
Problem can be seen here . As you can see in the fiddle, there's
Ive made a small program in C#.net which doesnt really serve much of a

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.