Toggles the 'inert' attribute on all sibling elements of the target element and its ancestors.
For each ancestor of the target element (up to the document root), this function finds all sibling elements
and toggles their 'inert' attribute. If a sibling has the 'inert' attribute, it is removed; otherwise, it is added.
Parameters
target: string|HTMLElement
The target element or the ID of the target element around which to toggle 'inert' on siblings.
Returns void
Example: Imports
// ES Module import { toggleInertAround } from'@bnidev/js-utils'
Toggles the 'inert' attribute on all sibling elements of the target element and its ancestors.
For each ancestor of the target element (up to the document root), this function finds all sibling elements and toggles their 'inert' attribute. If a sibling has the 'inert' attribute, it is removed; otherwise, it is added.