title: How to remove and recreate element with jquery?
body: <p>I have elements and I want to remove this element on responsive but I want to recreate again on desktop</p>
  
  <p>I mean I want to remove this element in <code>if</code> and I want to create again in <code>else</code></p>
  
  <p>my project is something like that</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(window).resize(function(){
     var width = $(window).width();
     if(width &lt;=768){
         $('.element').remove();
     }else{
      //create again 
    }
  }).resize();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="element"&gt;
  &lt;p&gt;something here..&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>footnote: please I don't want to hide it because it div is showing when I scroll then if I hide it after scroll on mobile then it will be shown again..</p>