title: jQuery window resize and less than certain width
body: <p>I have search a lot but couldn't find proper solution. I am going to element prepend/append to another element after certain width. But it works after resize browser only. </p>
  
  <p>I have found this solution but <a href="https://stackoverflow.com/questions/10642424/js-or-jquery-or-window-resize-or-when-window-width-is-less-than-npx">still not helpful</a></p>
  
  <p>How can i achieve?</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).on("resize", function(event){
    $vWidth = $(this).width();
    $('#test').html($vWidth)
  });</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 id="test"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>