Fixes for the javascript show/hide prototype to jquery conversion.

Fix for the javascript show/hide conversion to jquery on top of #980.