Skip to content
This repository was archived by the owner on Apr 10, 2020. It is now read-only.

Commit 4144c30

Browse files
committed
Merge remote-tracking branch 'craigfowler/master'
Conflicts: src/SVGMagic.js
2 parents c4e7de5 + a8ef336 commit 4144c30

File tree

5 files changed

+482
-110
lines changed

5 files changed

+482
-110
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "json3"]
2+
path = json3
3+
url = https://github.com/bestiejs/json3.git

example/index.html

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Example of jQuery SVGMagic</title>
5+
</head>
6+
<body>
7+
<img src="sample-svg1.svg" class="replace_me" />
8+
<img src="sample-jpeg.jpeg" class="replace_me" />
9+
<div style="width: 100px;height: 100px;background-image:url('sample-svg2.svg');" class="replace_me">Background</div>
10+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
11+
<script src="../src/jquery.svgmagic.js"></script>
12+
<script>
13+
$(document).ready(function() {
14+
$('.replace_me')
15+
.svgmagic({
16+
remoteServerUri: 'http://example.com/',
17+
forceReplacements: true,
18+
handleBackgroundImages: true,
19+
replacementUriCreator: function(element, originalUri, isBackground) {
20+
return originalUri.replace(/\.svg$/, '.replaced.png');
21+
}
22+
});
23+
});
24+
</script>
25+
</body>
26+
</html>

json3

Submodule json3 added at 5fbfe36

src/SVGMagic.js

-110
This file was deleted.

0 commit comments

Comments
 (0)