Skip to content

Commit

Permalink
Merge pull request flatlogic#9 from bdaenen/B-nested-tab-content
Browse files Browse the repository at this point in the history
Nested HTML is moved incorrectly due to selecting duplicate children (find(*) -> children(*))
  • Loading branch information
okendoken committed Apr 17, 2014
2 parents cc74958 + fb5a8c2 commit 502f4ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bootstrap-tabcollapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
$panelBodies.each(function(){
var $panelBody = $(this),
$tabPane = $panelBody.data('bs.tabcollapse.tabpane');
$tabPane.append($panelBody.find('*').detach());
$tabPane.append($panelBody.children('*').detach());
});
this.$accordion.html('');

Expand Down Expand Up @@ -103,7 +103,7 @@
var $tabPane = $(tabSelector),
groupId = $tabPane.attr('id') + '-collapse',
$panel = $(this.options.accordionTemplate($heading.html(), groupId, parentId, active));
$panel.find('.panel-body').append($tabPane.find('*').detach())
$panel.find('.panel-body').append($tabPane.children('*').detach())
.data('bs.tabcollapse.tabpane', $tabPane);

return $panel;
Expand All @@ -127,4 +127,4 @@
$.fn.tabCollapse.Constructor = TabCollapse;


}(window.jQuery);
}(window.jQuery);

0 comments on commit 502f4ef

Please sign in to comment.