replaceAll1 jQuery API 정복 - 요소 바꾸기, replaceAll() .replaceAll() 원문 링크 http://api.jquery.com/replaceAll/ .replaceAll( target )Returns : jQuery 개요 : 조건에 맞는 요소들을 타겟(target)요소들로 대체합니다. .replaceAll( target ) target 대체 요소를 나타내는 선택자 .replaceAll() 함수는 .replaceWith()를 모티브로 해서 만들었지만, 소스와 타겟의 위치는 바뀌어 있습니다. DOM 구조를 보시죠. Hello And Goodbye 엘리먼트=요소를 만들어서 다른 요소를 대체해 보시죠. $('New heading').replaceAll('.inner'); 결과는 아래처럼: New heading New heading New heading 또는, 기.. 2011. 11. 22. 이전 1 다음