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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:07:19+00:00 2026-05-25T20:07:19+00:00

I have webpages with several (and more is coming) types of data, each represented

  • 0

I have webpages with several (and more is coming) types of data, each represented by a bar and a pie Google chart image:

<h3>Data_1</h3>
<p class="chart" align="center">
<img class="primary" src="pie_1.png">
<img class="secondary" src="bar_1.png">
</p>

<h3>Data_2</h3>
<p class="chart" align="center">
<img class="primary" src="pie_2.png">
<img class="secondary" src="bar_2.png">
</p>

....

Initially I’d like to display pie-charts and hide bar-charts.

When user clicks a pie-chart, I’d like to toggle it to bar-chart with a slide effect.

I think, I have a good idea how to do it with jQuery – using individual ids like #pie_1, #bar_1, #pie_2, #bar_2, …

But I wonder, if a more general approach is possible here?

  • 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-25T20:07:20+00:00Added an answer on May 25, 2026 at 8:07 pm

    You can use the .next() and the .prev() jQuery methods, like this:

    bars.click(function () {
        $(this).slideUp().next().slideDown();
    });
    pies.click(function () {
        $(this).slideUp().prev().slideDown();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently making a global volunteer site, and the webpages will more or less have
I have several forms on a webpage to submit responses corresponding to each listed
I have several webpages with facebook metatags. The problem is, that Facebook is starting
I have product item webpages located in /product/items/*.html?id=12345&ref=54321 and I would like the webpages
I have a simple program that checks webpages for strings, example: Private Sub Button1_Click(ByVal
I have a cherrypy server distributing xml files to webpages. While my server runs,
I have a Menu class that has a IQueryable property called WebPages. In the
I have the following code in one of our projects webpages: XmlDocument xDoc =
I have some XML files which are used to generate my webpages, however I
I need to have a grid on one of my webpages that will be

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.