fixed Issue #237
jQuery contents() function doesn't work properly. It doesn't return the DOM elements in the correct order. It first displays the first level elements and then second level elements instead of traversing through a tree.