Category: jQuery

한 노란 항목에서 두 목록의 마지막 칸으로 갈라지는 화살표

jQuery .appendTo(): Insert Content as the Last Child

Use jQuery .appendTo() to add an item to several lists, then style or remove the original and its copies through the returned collection.

왼쪽은 스위치가 꺼진 기본 카드, 오른쪽은 스위치가 켜진 노란색 강조 카드

jQuery .toggleClass(): Toggle a Class or Set Its State

Compare switching a class with setting it from a boolean in jQuery .toggleClass(). Run a button and checkbox example and check styling and accessible state.

물건을 모두 꺼내고 파란 쟁반만 남은 상태를 보여주는 전후 비교

jQuery .empty(): Clear Content and Keep the Container

Clear a result panel with jQuery .empty() while keeping its container. A runnable example shows how to refill it, preserve delegated events, and clear input values.

두 항목 중 주황색 항목만 제거되어 청록색 항목이 남는 전후 비교

jQuery .remove(): Remove Elements, Data, and Events

Use jQuery .remove() to delete matching nodes within a list. See how to check the selection and what happens to jQuery data and events when a node is reinserted.

jquery reference css 01

jQuery .css(): Read, Set, and Clear Styles

Read computed styles, set and clear inline properties, and handle CSS units and numeric values in jQuery 4.0.

jquery reference width 01

jQuery .width(): Measure and Set Content Width

Compare content, padding, and border widths, and verify how width getters and setters behave with border-box sizing.

두 항목이 하나의 청록색 틀에 모이기 전과 후

jQuery .wrapAll(): Put Selected Elements in One Wrapper

Use jQuery .wrapAll() to group separated elements under a shared parent. Run an example to see what happens to unselected siblings, document order and delegated events.

jquery reference has 01

jQuery .has(): Select Elements with Matching Descendants

Filter the original selection by matching descendants, and see why has and find return different elements.

같은 순서의 카드 두 장을 그대로 두고 바깥 청록색 테두리만 제거한 비교 그림

jQuery .unwrap(): Remove a Parent and Keep Its Children

Remove an immediate parent with jQuery .unwrap() while keeping its children. Test the parent filter and verify that a child’s click handler survives.

두 항목이 각각 별도의 청록색 틀 안에 들어가기 전과 후

jQuery .wrap(): Wrap Each Element Separately

Use jQuery .wrap() to give each selected element its own parent. Run an example, prevent repeated wrapping, and compare .wrap() with .wrapAll() and .wrapInner().