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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:18:29+00:00 2026-05-23T14:18:29+00:00

problem between parent and child DIV. when u click on child div will show

  • 0

problem between parent and child DIV. when u click on child div will show up same as parent div. i want child div not follow parent div action. i tried stopPropagation() is not work or maybe im confuse.

html code:

<div class="innerbox">
<div id="button"></div>
</div>

jQuery code:

<script type="text/javascript">
//<![CDATA[
function ShowHide(d){
    $("div#button").click(function(e) {
       e.stopPropagation();
       return;
    });

    //$(".innerbox").click(function(e) {
        jQuery(d).animate({"height": "toggle"}, {
            duration: 500,
            complete: function() {
                //add action after complete action...
            }
        });
    //});
}
//]]>
</script>
  • 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-23T14:18:29+00:00Added an answer on May 23, 2026 at 2:18 pm

    If you’re saing that when the “.innerbox” div is clicked, you want to animate it, but you don’t want the “#button” div to be animated, you’ll have to move the “#button” div out of the “.innerbox” div, as a child element is going to be affected by animation on its parent.

    stopPropagation is about stopping the event itself bubbling up to ancestor elements, not the effects of what you do. Certainly in that case, the click event is being stopped and not sent onto the “.innerbox” div.


    This may be off-topic, but when/how do you call ShowHide? Because you’re hooking up an event handler within the function; a new handler will be attached every time you call ShowHide. I don’t think that’s likely what you want…

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

Sidebar

Related Questions

Problem: I would like to share code between multiple assemblies. This shared code will
I'm having a problem with LINQ. I have 2 tables (Parent-child relation) Table1: Events
I can not use parent project with two child projects and drawing a dependency
I have a problem with a simple @OneToMany mapping between a parent and a
Scenario: Parent-child relationship between CustomerOrders & CustomerOrderItems in db. Both CustomerOrders and CustomerOrderItems are
I have this situation where I have a parent child relationship between two sets
I'm using the project.task model where delegation creates a parent/child link between both. When
I have one-to-many relationship between parent and child Java objects. The parent object uses
HI, I have 3 tables: Clips , Books and relationships between ClipBook Problem is:
My problem is to send a structure between a program in C to a

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.