method2
jQuery 메서드 비교 append, prepend
append() Inserts the specified content, to the end of each element in the set of matched elements.Inserts the specified content as the last child of each element in the jQuery collection.Puts data inside an element at the last index잘라서 붙여 넣기(이동) / 콘텐츠 끼워 넣기 syntax:.append( content [, content ] ).append( function ) $gnb.find("li").each(function() { if ( $(this).find("a").prop("href") == window.lo..
jQuery 메서드 비교 hide, detach, empty, remove
hide() Hides the matched elements. Sets the matched elements' CSS display property to none. detach() Removes the set of matched elements from the DOM. Removes all child elements with the selected elements. Keeps all data and event handlers of the removed elements. Preferred to remove elements but to keep copy of the removed elements for reuse at a later time. How to reinsert the detached element..