Check for the data attribute.
Comparison correctness.
Mind indentation.
Replaced search drop-down arrow with a proper search icon.

Fixes bug 2739.