title: How Can i scale Raphael js elements on window resize using jquery
body: <p>How can i rescale all the element inside a <code>Raphael</code> canvas on window change ?</p>
  
  <p>considering the following code / <a href="http://jsfiddle.net/minagabriel/vHXCc/" rel="noreferrer">DEMO</a> if i re-size my window only <code>div container</code> scaled since i set its width to 50% of the window width and none of the (<code>rect</code> , <code>circle</code> or <code>path</code>) change </p>
  
  <p><strong>CODE</strong> </p>
  
  <pre><code>&lt;div id="container"&gt;&lt;/div&gt;​
   #container{border : 1px solid black ;
                 width : 50% ;
                 height:300px}​
  var con = $("#container");
  var paper = Raphael(con.attr('id'), con.attr('width'), con.attr('height'));
  var win = paper.rect(0,0,400,300).attr({stroke: 'black' }) ; 
  var path = paper.path("M 200 100 l 100 0 z") ; 
  var cir = paper.circle(50, 50, 40);
  </code></pre>
  
  <p>​</p>