I want to select all the elements that have the two classes a and b.
a
b
So, only the e
For better performance you can use
$('div.a.b')
This will look only through the div elements instead of stepping through all the html elements that you have on your page.