iPhone 4s volume bar disappearing
There might be lint in the headphone jack. The lint is partially blocking the contacts, which is causing intermittent behaviour.

Get a wooden toothpick. Use the toothpick to remove lint. Be gentle.

Some people suggest using a can of compressed air. This is potentially bad because lint can be blown further INTO the device.

If you need more information about cleaning your phone, there are various online sites that can help.