Why not

    s.display = s.display == 'block' ? 'none' : 'block';

here and below?

Also, I'd switch `none` and `block` as sometimes `display` returns empty string even if element is shown:

    s.display = s.display == 'none' ? 'block' : 'none';