The way it should be done is have them as an invisible div and on the click of a button make them visible or second option is to use the innerHTML of the div to be injected with the code