IE issue with .children()

IE issue with .children()

I'm trying to use the following code to get me the html of a div with the id of accordion and then append the code to another part of the page.

  1. ...
  2. // set accordion object
  3. var accordion = $('#accordion');

  4. // get html for each section
  5. var sectionHTML = accordion.children();
  6. ...
  7. accordion.append(sectionHTML[i]);
  8. ..
The "accordion.append(sectionHTML[i]);" html appends correctly in Chrome, FF and Safari but not IE6+. Instead only the container is returned within IE. I realize I can use .html() to get the html from each section but having to unwrap() and wrap() is just too clunky imo.

Any thoughts on how I can fix this in IE?