how to select all div with data attribute 1

how to select all div with data attribute

/*Jquery*/
/*SM: the syntax is pretty straightforward*/
console.log($("[data-my-custom-attribute]"));

Here is what the above code is Doing:
1. Select all elements with a data-my-custom-attribute attribute.
2. Log the result to the console.

Similar Posts