Skip to content

Commit

Permalink
fix svg sample. Fix #32
Browse files Browse the repository at this point in the history
  • Loading branch information
clmath committed Nov 5, 2015
1 parent e905317 commit 2e61f64
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions samples/svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
require([
"requirejs-dplugins/svg!requirejs-dplugins/samples/svg/add.svg",
"requirejs-dplugins/svg!requirejs-dplugins/samples/svg/download.svg"
]);
], function (addId, downloadId) {
document.getElementById("addIcon").setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + addId);
document.getElementById("downloadIcon").setAttributeNS("http://www.w3.org/1999/xlink", "href", "#" + downloadId);
});
</script>
</head>
<body>

<svg>
<use xlink:href="#add"></use>
<use id="addIcon"></use>
</svg>
<svg>
<use xlink:href="#download"></use>
<use id="downloadIcon"></use>
</svg>

</body>
Expand Down

0 comments on commit 2e61f64

Please sign in to comment.