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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:15:38+00:00 2026-05-21T03:15:38+00:00

Here is the HTML <a style=border: medium none; display: block; class=agendaNav href=#><img class=rightArrow src=/images/arrowdown.png>

  • 0

Here is the HTML

<a style="border: medium none; display: block;" class="agendaNav" href="#"><img class="rightArrow" src="/images/arrowdown.png"> WEEK AT A GLANCE</a>

<div class="agendaDay">

  Content In Here

</div>

The Same link / class is repeated several times and I use the following JQuery:

$('.agendaNav').click(function(event){
    event.preventDefault();
    if($(this).find('.rightArrow').attr('src')=='/images/arrowdown.png'){
        $(this).find('.rightArrow').attr('src', '/images/arrowright.png');
        $(this).attr('style', 'border-bottom: 1px solid #fff; display: block;');
    } else {
        $(this).find('.rightArrow').attr('src', '/images/arrowdown.png');
        $(this).attr('style', 'border: none; display: block;');
    }
    $('.agendaDay').toggle('fast');
});

If you take a look here:

http://icuc2011.com/agenda

You’ll see that it changes every class of agendaDay which makes sense, but I only want to change the one directly after the ‘a’ tag that was clicked, I tried this:

$(this).next('.agendaDay').toggle('fast');

But then the arrow changes but the div of class agenda day doesn’t change at all, what am I doing wrong?

  • 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-21T03:15:39+00:00Added an answer on May 21, 2026 at 3:15 am

    Your example doesn’t match your actual code. In your code the link is inside a p tag. The div is a sibling following this p tag. If this is consistently the way it works, then you want:

    $(this).parent().next('.agendaDay').toggle();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the input (html, not xml): ... html content ... <tag1> content for
Here is an example of polymorphism from http://www.cplusplus.com/doc/tutorial/polymorphism.html (edited for readability): // abstract base
I'm using an HTML sanitizing whitelist code found here: http://refactormycode.com/codes/333-sanitize-html I needed to add
Does anyone here has any experience on how to send HTML emails that renders
Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
In my main page (call it index.aspx ) I call <%Html.RenderPartial(_PowerSearch, ViewData.Model);%> Here the
<!DOCTYPE html> <html lang=en> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js type=text/javascript></script> <script type=text/javascript>
I am trying to enable these debugging preferences (NSShowAllViews, NSShowAllDrawing) as shown here: http://developer.apple.com/technotes/tn2004/tn2124.html#SECAPPKITVIEWS
Here's a basic regex technique that I've never managed to remember. Let's say I'm

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.