Velo by Wix: Query selector for child elements

Get the child elements inside a parent node. In this post, we take a look deeper at $w() selector and try to filter children elements by the specific parent node

Read this article on my Blog

Let’s suppose we have a few containers with checkboxes in each of them. We don’t know how many checkboxes will be in each container at the final design.

Each container has a “select all” named checkbox that allows us to check on/off all checkboxes into a current target container.

We want to provide a good abstract solution for avoiding hard coding of elements’ ID. And ensure scaling for any count of the elements in the future.

In general, we need to find a way to query select all child elements into a specific parent node. There are exist similar selectors in DOM and CSS.

More: Blog Post

--

--