Dynamically creating new DOM elements will be a small tiny bit, less efficient than switching the properties of elements that already exist in the document.
But such optimization is really only a consideration in very large, terribly complex single-page applications made of thousands and thousands of dynamic elements.
For everyday web development, your decision should be based primarily on what suits you best, a modest, redesigned, underpaid web developer.
source share