Fix ajax when the a tag hasn't the href