Switch to using attr() check instead of getBBox()