stompcooler.js
/**
   * Swap JQuery elements content based on a swap style
   *
   * @param elt {object} - JQuery object representing the element to act on
   * @param content {object} - JQuery object representing content to be swapped in
   * @param swapStyle {string} - Decides how to swap the content
   */
Swap JQuery elements content based on a swap style
@param elt {object} - JQuery object representing the element to act on
@param content {object} - JQuery object representing content to be swapped in
@param swapStyle {string} - Decides how to swap the content
Swap JQuery elements content based on a swap style @param elt { object } - JQuery object representing the element to act on @param content { object } - JQuery object representing content to be swapped in @param swapStyle { string } - Decides how to swap the content
function swapContent(elt, content, swapStyle) {
    switch (swapStyle) {
      case "append": {
        elt.append(content);
        break;
      }
      case "prepend": {
        elt.prepend(content);
        break;
      }
      case "replace": {
        elt.empty().append(content);
        break;
      }
      default: {
        throw `${swapStyleHeader} must be one of ['append', 'prepend', 'replace'].`;
      }
    }
  }
function swapContent ( elt , content , swapStyle ) { switch ( swapStyle ) { case "append" : { elt . append ( content ) ; break ; } case "prepend" : { elt . prepend ( content ) ; break ; } case "replace" : { elt . empty ( ) . append ( content ) ; break ; } default : { throw ` ${ swapStyleHeader } ` ; } } }
Swap JQuery elements content based on a swap style
 @param elt {object} - JQuery object representing the element to act on
 @param content {object} - JQuery object representing content to be swapped in
 @param swapStyle {string} - Decides how to swap the content
Swap JQuery elements content based on a swap style @param elt { object } - JQuery object representing the element to act on @param content { object } - JQuery object representing content to be swapped in @param swapStyle { string } - Decides how to swap the content