title: Resizable handles not working if created runtime
body: <p>Trying to achieve a simple functionality of re sizing inner element through outer element.</p>
  
  <p>JQuery resizable handles not working if element and custom handles are created through js. Below is the js code.</p>
  
  <pre><code>var resizable_handles_html = '[div sructure]'; //editor ommiting codes :)
  
  $(function(){
    $("#clickMe").click(function(){
      $("[tried to put div here]")   //editor ommiting codes :)
        .css({
          'background':'white',
          'width':'100px',
          'height':'100px',
          'border':'dotted 1px #000',
          'position':'relative'
        })
        .append(resizable_handles_html)
        .draggable()
        //.resizable({handles: "n, e, s, w, ne, se, sw, nw"})
        .resizable({
          handles: {
            'nw': '.nwgrip',
            'ne': '.negrip',
            'sw': '.swgrip',
            'se': '.segrip',
            'n': '.ngrip',
            'e': '.egrip',
            's': '.sgrip',
            'w': '.wgrip'
          }
        })
        .append(
          $("[tried to put div here]")   //editor ommiting codes :)
            .attr({
              id:'text',
              contenteditable:'true'
            })
            .css({
              'background':'blue',
              'width':'auto',
              'height':'auto',
              'border':'dotted 1px #000',
              '-moz-border-radius': '15px',
              '-webkit-border-radius': '15px',
              'border-radius': '15px',
              '-khtml-border-radius': '15px'
            })
        )
        .appendTo('body');
    });
  })
  </code></pre>
  
  <p>Tried to paste contents of variable 'resizable_handles_html', but showing only quotes.</p>
  
  <p>Now element is getting created but throwing an error </p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot read property 'ownerDocument' of
    undefined" on click of that element."</p>
  </blockquote>
  
  <p>It is not happening for draggable thats for sure. Created a fiddle <a href="http://jsfiddle.net/keshabdey/7m8GF/5/" rel="nofollow"><a href="http://jsfiddle.net/keshabdey/7m8GF/5/" rel="nofollow">http://jsfiddle.net/keshabdey/7m8GF/5/</a></a></p>
  
  <p>Any help will be appreciated.</p>