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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:36:57+00:00 2026-05-28T17:36:57+00:00

Sorry for this title impossible to understand. I have this: <a class=directory> Directory 1

  • 0

Sorry for this title impossible to understand.

I have this:

<a class="directory">
    Directory 1
    <a class="add">Add a file</a> //show/hide on mouseover
</a>

for:

enter image description here

I do a toggle when I click on the first <a> to view the files :

$('a.directory').click(function() {
    $(this).parent().find('ul:first').slideToggle('medium');
});

I add a file when I click on the second <a>.

How do I check that I just click on the first <a> to avoid opening the folder when I click on the second <a>?

I try this but doesn’t work:

$('a.directory:not(.add)').click(function() {
    $(this).parent().find('ul:first').slideToggle('medium');
});
  • 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-28T17:36:58+00:00Added an answer on May 28, 2026 at 5:36 pm

    Pull the second <a> out of the first one, that is not valid HTML anyway. Then you can format using CSS to get the same effect stylistically.

    <a class="directory">
         Directory 1
    </a>
    <a class="add">Add</a>
    

    Your selectors should then work as you’d expect.

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

Sidebar

Related Questions

Sorry the title is not very clear. This is a follow up to my
Sorry for the slightly rubbish title. I could not think how to describe this
Sorry for the unhelpful title, but hopefully I can explain this well enough. Lets
Sorry for the vague title, as I really can't explain this problem succinctly. Basically
Sorry for the poor title, can't think of a succinct way of putting this..
Sorry for the somewhat confusing title. Not sure really how to title this. My
I am sorry if this has been posted before. I have searched many websites
Ok the title isn't a great help I'm sorry but this is what I'm
I am sorry about the title of this post, but I've no idea how
Sorry. I don't know a good title for this, but please look here: http://joshblog.net/projects/logic-gate-simulator/Logicly.html

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.