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.
- ...
- // set accordion object
- var accordion = $('#accordion');
- // get html for each section
- var sectionHTML = accordion.children();
- ...
- accordion.append(sectionHTML[i]);
- ..
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?