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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:17:29+00:00 2026-05-20T03:17:29+00:00

i need to hide/show javascript-generated content, see below: $(window).load(function () { $(body).html(‘<a href=# id=ipsum>Show

  • 0

i need to hide/show javascript-generated content, see below:

$(window).load(function () {
    $("body").html('<a href="# id="ipsum">Show Ipsum</a><br />' +
        '<p id="lorem_content">Lorem</p><p id="ipsum_content">Ipsum</p>' +
        '<p id="dolor_content">dolor</p>');
    $("p").hide();
    $("p#lorem_content").show();

    $("a").live("click", function() {
        $("p").hide();
        $("p#" + $(this).attr('id') + "_content").show();
    });
});​

http://jsbin.com/olebu3/edit

The content, which should shows after clicking on a#ipsum is not being shown… why?
The jQuery hide() method should just set to the content “display:none“, not remove the content, isn’t that true?

  • 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-20T03:17:30+00:00Added an answer on May 20, 2026 at 3:17 am

    Change <a href="# id="ipsum" to <a href="#" id="ipsum" in second line. You forgot a quote

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

Sidebar

Related Questions

I have a JavaScript where I need to hide (and eventually show) some text
I need to show/hide image in html page. I thought its very simple. But
Hey, can you help me figure this out? I need to hide/show a div
I need to hide or show a combo depending on the value of the
I have a need to show 2 dialog modals at once. Due to the
I'm struggling with implementing a custom accordion. It really is just a slideToggle show/hide,
The background is : I have layout page main.gsp I need to conditionally show
I am just learning javascript, so please bear with me! I want to be
I need to programmatically trigger the change event. This I can usually do, but
I'm having a little bit of trouble making OpenID work from within an iframe.

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.