Category: jQuery

서로 다른 두 주문 요약 바로 위에 각각의 배송 예정일 안내가 놓인 모습

jQuery .before(): Insert Content as the Previous Sibling

Use jQuery .before() to insert delivery notes before order summaries and a callback to generate a different note for each order.

두 입력란 모두에 청록색 속성 표시가 추가되는 전후 비교

jQuery .attr(): Read and Set HTML Attributes

Use jQuery .attr() to read and update HTML attributes, compute different values for individual elements, and distinguish markup from live form state.

두 작업 제목 뒤에 상태 안내와 다음 단계가 순서대로 놓인 모습

jQuery .after(): Insert Content as the Next Sibling

Use jQuery .after() to put a status and next step after each job heading and compare the order from one call and consecutive calls.

큰 파란색 쟁반과 그 안의 작은 쟁반에 주황색 타일이 하나씩 놓이고 바깥에는 짙은 회색 타일이 놓인 모습

jQuery .find(): Select Matching Descendants

Use jQuery .find() to select descendants in a container, compare it with .children(), .filter(), and .has(), and diagnose empty results in a runnable example.

입력값을 나타내는 청록색 줄은 남고 회색 안내 줄만 제거된 전후 비교

jQuery .removeAttr(): Delete HTML Attributes

Use jQuery .removeAttr() to delete one or more HTML attributes. Compare deletion with an empty value and test how an input value and checkbox state behave.

두 항목 중 아래쪽 항목만 노란색 강조가 해제된 전후 비교

jQuery .removeClass(): Remove Specific or All Classes

Use jQuery .removeClass() to clear selected class names or all classes. Compare the results in a browser, preserve base classes, and use a callback to remove state names.

기존 두 항목에 청록색 테두리와 연한 노란색 배경을 더하기 전과 후

jQuery .addClass(): Add One or More CSS Classes

Use jQuery .addClass() to add class names while preserving existing ones. Test repeated additions and removal, generate per-item names, and inspect why a style might not apply.

두 패널의 내부 항목은 모두 강조되고 바깥 패널은 왼쪽만 강조된 그림

jQuery .addBack(): Include the Previous Traversal Selection

Use jQuery .addBack() to combine the current selection with the previous one. Compare its selector, a preceding .filter(), .add(), and .end() in a running example.

세 타일을 두 선택 영역이 감싸고 가운데 타일은 두 영역에 공통으로 포함된 그림

jQuery .add(): Combine Element Selections

Use jQuery .add() to combine selections without duplicating elements. Check scope and document order in a runnable example, then insert an HTML node you added to the selection.

두 공지 목록에서 노란 항목과 초록 항목의 위아래 순서가 서로 바뀐 모습

jQuery .prepend(): Insert Content as the First Child

Add announcements to the top of a list with jQuery .prepend() and compare how one call and separate calls affect their order.