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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:57:41+00:00 2026-06-07T17:57:41+00:00

I have two div’s that are being placed in the DOM after the page

  • 0

I have two div’s that are being placed in the DOM after the page loads, with jquery. I’m having a hard time binding one div action to showing another element. Any pointers?

  jQuery('#create-account-btn').live('click',function(){
    jQuery('#create-account').show();
    jQuery(this).hide();
  });

Create-account will now show

  • 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-07T17:57:42+00:00Added an answer on June 7, 2026 at 5:57 pm

    Working Demo http://jsfiddle.net/Zvd8J/

    Jquery .on event read more here but only above v 1.7 : http://api.jquery.com/on/ .live here: http://api.jquery.com/live/

    if you keen: What's the difference between jQuery .live() and .on()

    Further if you become more keen: see here why : What's wrong with the jQuery live method?

    Took liberty to jot down small html and demo for you.

    Hope this helps, :)

    Also note: you could do this:

    $(document).on('click','#create-account-btn',function(){
    
    });
    

    code

    $('.hulk').hide();
    $('#create-account-btn').on('click',function(){
        $('.hulk').hide();
        $('#create-account').show();
    
      });
    
    $('#foo').on('click',function(){
        $('.hulk').hide();
        $('#create-whatever').show();
    
      });
    

    html

    <div class="hulk" id="create-whatever">
    hulk yada yada
    </div>
      <div class="hulk" id="create-account">
    ironman yada yada crea accoutn show
    </div>
    <input type="button" id="create-account-btn" value="click me" />
    
    <input type="button" id="foo" value="click me to show another" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two div in my website page one beside the other(one left and
I have two div elements that are twins (i.e. their dimensions and contents are
I have two divs: <div class=outer> <div class=inner>Example</div> </div> And I have a jQuery
I have two div tags in single HTML with data-role as 'page'. First one
I have two div columns sidebar(left) and page-content(right). I toggle removing and adding 'sidebar'
I have two div on my page. One is draggable and other is droppable
I have two div element in my page aligned vertically. content of one div
So I have two div elements on my page, one directly on top of
Ok so i have two div's which are hidden using jquery's .hide(); onload I
I have two different div elements on two different webpages that use two different

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.