Improve previous commit

I realized there's a slicker way to do this with jquery.