apamphilon

Move Elements on responsive using jQuery

//move element on mobile
moveElements(); //call the function initally
setTimeout( moveElements, 300 ); //call the function again after giving the site 300ms to kick in
$(window).resize( moveElements ); //bind the function to the resize event

function moveElements() {
  if ($('.nav-toggle').css('display') == 'block') {
    $('.header-cta').insertAfter('.masthead');
  } else {
    $('.header-cta').insertAfter('.mastnav');
  }
}

Comments: