Skip to content

Instantly share code, notes, and snippets.

@dokipen
Created April 27, 2010 15:54
Show Gist options
  • Save dokipen/380905 to your computer and use it in GitHub Desktop.
Save dokipen/380905 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<title>Test</title>
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery-svg/jquery.svg.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#svg').svg({onLoad: function(svg){
svg.load('/static/svg/cards.svg', {
addTo: true,
onLoad: function(svg, error) {
var cards = $('#svg svg');
cards.height(600);
$('#all').hide();
var kh = $('#king_heart');
svg.add(kh);
}
});
svg.configure({
width: 600,
height: 600
});
}});
});
</script>
</head>
<body>
<div id="svg" width="600" height="600">
</div>
</body>
</html>
<!--
// vim: ts=2 sw=2 noautoindent
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment