Is there a reason you can't just do `div.innerHTML = <div id="hint-swipe-to-navigate" class="hint hide"></div>`?