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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:09:54+00:00 2026-06-04T08:09:54+00:00

Slap me if I am going about this wrong, I am quite the beginner.

  • 0

Slap me if I am going about this wrong, I am quite the beginner.

Here is my setup, which is very similar visually to Outlook’s UI I guess.

Left pane (floating div) contains a list of containers you can click on (like emails). Right hand pane contains a set of non-visible containers that should become visible when their class is changed to a different css class.

I’m trying to set it up where if you click on the element in the left pane, it then performs an onclick javascript action (stored in an external .js file) that toggles the right div’s class value between two css classes.

The onclick in the left pane div passes $_row[‘uniqueID’] to the function. That is the uniquely incremented column name. It is also the ID value of the right pane ‘s.

Putting this altogether, can someone direct me on how to do this?

left pane…

<div onclick=\"toggleMenu('".$row['uniqueIdentifier'],"'); \">

right pane…

<div id=".$row['uniqueIdentifier']," class=\"mL\">

css…

div.mL {display:none;}
div.mL.active {display:block;}
  • 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-06-04T08:09:56+00:00Added an answer on June 4, 2026 at 8:09 am
    function toggleMenu(div){
        $('#'+div).addClass('active');
    }
    

    jQuery has .addClass() and .removeClass() methods.

    I think that’s what you’re after, let me know if not.

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

Sidebar

Related Questions

I have a very complex system (100+ threads) which need to send email without
I'm using the Scriptaculous library to slap an appealing UI on an application which
I hope this is not one of those questions where I slap myself afterwards,
I'd like to slap everything in vendor/gems/gems/**/lib onto the load path. I've got a
I have a 4000px width image slap on the header of my site. for
I want to slap a simple class together to pick out QueryString variables from
At the moment I'm learning jQuery and I hit the topic about if/else statements.
I have a workspace with a project which links with the static libraries in
So I'm playing around with Jython, trying to slap together a generic GUI. Nothing
I'm trying to run a very simple 2D animation when I fling an image

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.