bonze $(selector)

Multiple input types: CSS string, context, array of selectors, HTML creation.

CSS selector

Pass any valid CSS selector string to find matching elements.

alpha
beta
alpha
beta
alpha
beta
// click a button

Context

Pass a second argument to restrict the search to a container element.

#ctx-one
one-1
one-2
one-3
#ctx-two
two-1
two-2
two-3
// click a button

Array of selectors

Pass an array to combine and deduplicate multiple selectors or elements.

x-1
y-1
z-1
x-2
y-2
z-2
// click a button

HTML string

Pass an HTML string to create DOM elements on the fly.