Skip to main content
100%

Gist 637706

✓ Published0🌍 Public
DDylanFM
Last edited Oct 21, 2010
Created on Oct 21, 2010

This example shows a jQuery plugin modification that preserves the original parent containers of filtered list items during activation and deactivation. The code explicitly handles cases where filtered items are not siblings by storing each item’s parent in its `data` object, then uses a `putBack` function to restore items to their correct parents. It relies on jQuery selectors like `tbody > tr` and methods such as `detach()`, `appendTo()`, and `data()`. The diff adds a `siblings` option to toggle between appending items together under a single parent or individually under their original parents.

AI-generated description

Similar vizzes