Is it necessary to set this in js? If we set the expanded/collapsed class on the lhnavigation, couldn't we use that class to set these values?