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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:49:02+00:00 2026-05-27T23:49:02+00:00

I am displaying name of groups from database in ul >li and it’s parameters

  • 0

I am displaying name of groups from database in ul >li and it’s parameters in <div> which is initially hidden. Now using jQuery I want to toggle only <div> but same time want to hide all others.

I have tried the following code but it does not work in jQuery 1.7. Can any one please help me how to use .not or .filter while selecting all divs that starts with “group” or some other solution?

$("#popupContact").delegate("ul.horizontal_lists li a", "click", function() {
    var target_id = $(this).attr('id');
    target_id = "divOf" + target_id;
    $('#' + target_id).slideToggle("slow");
    $('[id^="divOf"]'.not(this)).hide();
}
  • 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-27T23:49:03+00:00Added an answer on May 27, 2026 at 11:49 pm

    I think one of your main problems is that your searching for div’s, but excepting this. Since this is an anchor, I don’t think this’ll ever work

    $('[id^="divOf"]'.not(this)).hide();
    

    I think you’re looking for something like this:

    var target_id = $(this).attr('id');
    target_id = "divOf" + target_id;
    $('#' + target_id).slideToggle("slow");
    $('div[id^="divOf"]:not("#' + target_id + '")').hide();
    

    The last line selects all divs that have an id starting with divOf, but not the one with an id of target_id, and hiding them

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

Sidebar

Related Questions

I have a page that is displaying a company name and its details from
group_concat(A,' ',B,' ',C) as Name, then using this php for displaying <td><?php echo $row['Name'];
I'm having a little problem displaying data from a database... I have two database
I am displaying an image in tableview cell (Image name saved in a plist).
Here i am having a unordered list displaying two columns code and name .I
I have a DataTemplate that is displaying objects with three fields, e.g.: Name =
i came across the following ex, of displaying only the department name of employess
Design of SQL Table Users: Columns: ID(Primary Key), Name, Age, Zip. I am displaying
When displaying my DateTime values, I want them to be formatted like so: February
I have a database which will receive a whole bunch of information, but most

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.