Adding Bootstrap JS into functions rather than directly into header