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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:35:15+00:00 2026-05-19T22:35:15+00:00

Posted a few answers on SO, but this is my first question :) Bit

  • 0

Posted a few answers on SO, but this is my first question 🙂

Bit of background… I am playing with the easyAccordian plugin for jQuery: http://www.madeincima.eu/samples/jquery/easyAccordion/. Each slide (made of<dd>‘s) has dyamic content. On one particular slide I want to swap out the entire contents of the <dd> when the user clicks a button…

The code follows (or you can visit the jsFiddle):

HTML:

<dl>
<dt class="click">Slide heading</dt>
<dd class="specs"></dd>

<div style="display:none;">
    <div id="defaultSpecs">
        <div style="width:80%;margin-left:10%;text-align:center;margin-top:60px;">
            wrsyik5s7khgjsdghf      
        </div>
    </div>
</div>
</dl>

JS:

$("dt.click").click(defaultSpecs);

function defaultSpecs() {
    //alert($("#defaultSpecs").html());
    var defSpec  =  $("#defaultSpecs").html();
    //alert($("#defaultSpecs").html());
    $("dd.specs").html(defSpec);
    //alert($("#defaultSpecs").html());
    alert($("body").html());
}

This works a charm in Firefox and other versions of IE, however when used in IE7, it does not…

Html within the <dl> and below the <dd> is seemingly being destroyed and then (obviously) the function fails when called a second (or third) time…

Have I missed a crucial aspect of the <dl> or <dd> tags? Or is there something wrong with the jQuery .html() function?

A few things worth noting:

  • There are multiple <dd> and <dt>s
    in the original code, however the
    error still replicates without them.

  • I have included alerts so that you
    can see what the .html() of various
    elements return at certain points… feel free to uncomment them and tinker 🙂

Any help on this would be greatly appreciated 🙂

  • 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-19T22:35:16+00:00Added an answer on May 19, 2026 at 10:35 pm

    I think the problem is that your div tag is outside of the dd tags. It’s in the dl tag which may only contain either a dt or dd from what I gather. Try moving the div into the dd tag.

    Specifically, in my link note this:

    <!ELEMENT DL – – (DT|DD)+ — definition list –>

    If you were allowed to use other block level or inline tags, it would be like this:

    <!ELEMENT DL – O (%flow;)* — definition list –>

    Note the flow option means you can have block or inline level elements within it. Unfortunately, though, thats not the way it is. 🙁

    As to why you’re having issues, the browser is probably trying create the DOM while taking this into account and has to add new elements. This would cause issues with JavaScript trying to follow a specific structure since the browser is creating it’s own elements for the structure.

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

Sidebar

Related Questions

I Posted the background to this question a few days ago.. but the answer
I've found this question posed a few times, but no definitive answers as yet.
A few days ago I posted this question and everyone suggested me to use
EDIT: a few weeks after I posted this question Evan Coury wrote an excellent
I posted somethign relating to this a few days ago...but I still havent't resolved
I postet this question a few days ago but I didn't explain exactly what
This is a spin off from another question I posted a few days ago
I posted this question: https://stackoverflow.com/questions/418597/java-and-net-for-php-programmer and the answers I was given didn't really help
i have posted a few hours ago question about newtons method,i got answers and
I posted about this a few weeks ago, but I don't think I asked

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.