remove jquery dependency and make title text flexible