Code with svg.js not working in JSFiddle.com or my laptop
<p>Newbie to svg.js...</p>

<p>I first tried the example available at <a href="https://jsfiddle.net/wout/Vac2Q/" rel="nofollow">https://jsfiddle.net/wout/Vac2Q/</a> in safari on OS X and clicking run only makes the result pane white and then grey again. The code is here...</p>

<pre><code>&lt;div id="drawing"&gt;&lt;/div&gt;

/* create an svg drawing */
var draw = SVG('drawing')

/* draw rectangle */
var rect = draw.rect(50,50).move(100,100).fill('#f09')

/* make rectangle jump and change color on mouse over */
rect.mouseover(function() {
    this.animate(1000, SVG.easing.elastic)
    .move(400 * Math.random(), 400 * Math.random())
    .rotate(-45 + 90 * Math.random())
    .fill({
        r: ~~(Math.random() * 255)
      , g: ~~(Math.random() * 255)
      , b: ~~(Math.random() * 255)
    })
})

/* write text at the back */
draw.text('svg.js playground\ntry to grab the rectangle!')
    .back()
    .fill('#ccc')
    .move('50%', '40%')
    .font({
        family: 'Source Sans Pro'
     , size: 18
     , anchor: 'middle'
    })

/* create clock */
draw.clock('15%').back().start().move('80%', '80%')
</code></pre>

<p>I then tried to run the same code on my laptop after properly linking to source CDN but it fails with error "svg.js:3741 Uncaught TypeError: Cannot read property 'nodeName' of null" on chrome on OS X.</p>

<p>It doesn't matter which browser i use. it still fails with same error. I tried to include the sag element under the div element, set 'drawing' as id of sag element in place of div element etc but doesn't help.</p>

<p>What is happening here? Is it a bug in svg.js?</p>