Svg: simple example


 
 SVG Stuff
 
 
 https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js
 
 http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js
 
 
 
 
 
 
 


 

That was how to do it all inline. To decouple the svg from the parent html, you need something like this:

Now, until I included the namespace xmlns=”http://www.w3.org/2000/svg”, all  got was a dumb broken. With the namespace in place, you get this:

TestSvg05

This is a simple loop in JavaScript to print white piano keys…

https://github.com/aadennis/GrimUpNorth/blob/master/MusicTheory/TestOfSvgWithJs.html

Advertisements