Skip to content

Commit 035d17e

Browse files
committed
Helpful message for IE ( < 8 ) users
1 parent d18016f commit 035d17e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

demos/demos.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,14 @@ jQuery(window).load(function() {
126126

127127
// the first call initialises the svg
128128
// the second call fetches the handle
129+
if (jQuery.browser.msie) {
130+
jQuery('#message').html('<br/>If this message doesn\'t go off, your browser (Internet explorer) doesn\'t support SVG.<br/>Try installing the <a href="http://www.ieaddons.com/en/details/Time_Savers/Adobe_SVG_Viewer/">Adobe SVG Viewer</a>');
131+
}
129132
canvasElm.svg({'onLoad':function() {
130133
ctx = canvasElm.svg('get');
134+
if (jQuery.browser.msie) {
135+
jQuery('#message').empty();
136+
}
131137

132138
// ctx = {'svg':svgContext, 'buffers' : []};
133139
// initBuffers(svgContext);

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<body>
3838
<div id="CONTAINER">
3939
<p style="font-size:60%;margin-bottom:7em;"><span id="fpsText"></span> FPS <span id="stepSize"></span> Step size <span id="delayVal"></span> delay(ms)</p>
40-
<p style="font-size:120%;">Box2D JS demo</p>
40+
<p style="font-size:120%;">Box2D JS demo<span id="message"></span></p>
4141
<div id="canvas" style="width:600px;height:400px;"></div>
4242
<p>
4343
<span class="key">Left-click</span> to spawn an object.

0 commit comments

Comments
 (0)