1

JQuery Knob not working in IE 8. If you look at the site http://anthonyterrien.com/knob/ you'll see the problem. Comparability mode does not seem to work either. Any suggestions ?

James256
  • 11
  • 1
  • 3

1 Answers1

0

Just adding a bit more information to user2147420's answer, you can get excanvas.js here https://code.google.com/p/explorercanvas/downloads/detail?name=excanvas_r3.zip

There are examples with that download but if you want a quick view of how to use it, here is a lnk for that https://code.google.com/p/explorercanvas/wiki/Instructions

Just add this in the head section your html.

<!--[if lt IE 9]>
        <script src="pathToFile/excanvas.js"></script>
<![endif]-->

Note - the page I pointed to above says: "If you have created your canvas element dynamically it will not have the getContext method added to the element. To get it working you need to call initElement on the G_vmlCanvasManager object."

i.e. add this code to the appropriate place in the jquery knob javascript file

var el = document.createElement('canvas');
G_vmlCanvasManager.initElement(el);
var ctx = el.getContext('2d');
TheGooch
  • 11
  • 4
  • can you update your answer with exact code i need to add for jquery-knob to work. I have downloaded and added excanvas.js but still not working. – user1595858 Jul 08 '13 at 22:46
  • @user1595858 if you are creating the canvas element dynamically you might have to change the jquery knob code. I have edited my answer for this case. – TheGooch Jul 22 '13 at 15:19
  • Could you specify the location of the added code? I'm getting the IE8 error in this line: `this.c = this.$c[0].getContext("2d");` due to the `.getContext()`. Changing this code also brings up other issues else in the script. – jdepypere Aug 11 '13 at 13:48