To filter a selection you can use the .filter() method.
The method is called on a selection and returns a new selection. If the filter matches an element then it is added to the returned selection, otherwise it is ignored. If no element is matched then an empty selection is returned.
The HTML
Thi...