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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:38:18+00:00 2026-05-12T08:38:18+00:00

I have a few areas in a form I’m producing where I use jquery

  • 0

I have a few areas in a form I’m producing where I use jquery to appendTo a dom element I have created and slide it down as follows:

function createForm(event) {

   var input = $(event.data.element);
   var name = input.val();

   input.attr("disabled", true);
   input.parent().parent().fadeOut("slow", function() {
   $.get('<%=Url.Action("GetForm", "Controller") %>', { name: name },
             function(data) {
                var parentList = input.parent().parent().parent();
                var listCollection = $(data);

                listCollection.hide();
                listCollection.appendTo(input.parent().parent().parent()).slideDown("slow");

                $("#cancel_create").bind("click", { element: input }, revertForm).css({ "cursor": "pointer" });
             }, "html");
   });
}

This gets the html to display and appends it to the parent list. Works perfectly in FF and Chrome. In IE8 it inserts the elements correctly but does not expand the div surrounding the list so the new items appear to overflow. If I focus on another element it suddenly expands, also if I open developer tools it must trigger a redraw and the div expands.

Is this a bug?

EDIT:

Sorry I really should have included this. Html before insert

<li> <!-- This is failing to expand -->
    <h3>3</h3>
    <div class="container">
        <ul> <!-- This is parentList -->
            <li><input id="state1" name="Foo1" type="text" value="" /></li>
            <li><input id="state2" name="Foo2" type="text" value="" /></li>
            <li><input id="state3" name="Foo3" type="text" value="" /></li>
        </ul>
    </div>
<li>

and I am returning some extra list elements and appending them to parentList.

<li><input id="state4" name="Bar1" type="text" value="" /></li>
<li><input id="state5" name="Bar2" type="text" value="" /></li>
<li><input id="state6" name="Bar3" type="text" value="" /></li>

The

Thanks,

Ian

  • 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-12T08:38:18+00:00Added an answer on May 12, 2026 at 8:38 am

    This seems to be caused by the div surrounding the second list. I stripped the page down to basics and the removed the container and it expands.

    This is very odd as the container div itself does expand correctly it just affects its parent element expanding. Both it and the heading element are set as display:inline-block and this seems to be the cause.

    I’ve created a small self contained file to demonstrate. Open in FF/Chrome and then in IE8 for a comparison. If anyone has an explanation it would be very good to hear which one is the correct behaviour. I know which my money is on.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />   
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>    
    </head>  
    
    <body>
    <ul id="list1">
            <li>ListA</li>
            <li>ListB</li>
            <li style="background-color: Yellow">
                <div style="display: inline-block">
                <ul id ="list2">
                    <li>SubList1</li>
                    <li id="clickme">Click Me</li>
                </ul>
                </div>
            </li>
        </ul>
    <p>In IE8 the content overflows and list1 does not expand. Try double clicking one of the ExtraSubLists and it jumps back into place.</p>
    
    
    
    <script type="text/javascript">
        $(document).ready(function() {
            $("#clickme").click(function() {
                var div = $("<li>ExtraSubList</li>");
                div.hide();
                div.appendTo("#list2").slideDown("slow");
            });
        });
    </script>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement where few of my image views form border areas of
I'm creating a few web forms that have areas to them. Are fieldsets viable
We have few components like libraries dlls When initially created I ran the following
I have a few areas in my application that are relatively independent (all navigated
I have a simple jquery mobile site that includes a few buttons and a
I have a few areas on my site where I need to limit text
I have a WinForms Form with a few controls on it. All of them
I have an "Add Person" form with a few fields (name, address, phone number,
I have a few areas in my ASP MVC project. One area has near
We have a few text areas that have some text the user may copy

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.