Fix tooltip error

Tooltips weren't showing up because for some reason I thought there
was a `hasAttribute` function which there isn't, so I'm not sure how
I had it working before, but it works now.