adds dynamic js for hide/show functionality