Using jquery 1.7  [object Object] is displayed instead of title

I have changed all calls for attr to prop according to jquery documentation. It helped in my case, so I suppose it could be better to use it.