css only show scrollbar when scrolling code example
Example 1: scrollbar appear only when needed
overflow: auto
Example 2: html always show scrollbar
jQuery shouldn't be required. You could try adding the CSS:
body {overflow-y:scroll;}
This works across the latest browsers, even IE6.