Updated JS to include title attributes