title: JQuery add pagebreak (like Google Docs or MS Word) and go to next page
body: <p>Hi i need to create function to add pagebreaks like Ms Word with header and footer:</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
      var page = function({
          $("*").before(&lt;div id="header" style="border-bottom:2px solid;position:absolute; top:10px"&gt;&lt;/div&gt;)
          $("*").after(&lt;div id="footer" style="border-top:2px solid;position:absolute; bottom:10px"&gt;&lt;/div&gt;);
          if ($(body).outerheight()) &gt; 
          {
              $("#footer").after&lt;div style="page-break-after:always, margin:9px solid;"&gt;&lt;/DIV&gt;
          }   
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>My problem is : How can I go to the next page(and create this) like google docs(space into page1 page 2)</p>
  
  <p>I want to use this in tinymce 4.0.</p>