Could anyone help me to figure out why this code does not work on IE 8 ? (It works on Chrome, Firefox, Opera).
The code use Raphäel.js library, the code allow user to mouse drag Raphäel.js elements (e.g. circle, rectanglar)
Please have a look here:
var paper = Raphael(0, 0, '100%', '100%');
var circle = paper.circle(75, 75, 50);
var rect = paper.rect(150, 150, 50, 50);
var set = paper.set();
set.push(circle, rect);
set.attr({
fill: 'red',
stroke: 0
});
var ox = 0;
var oy = 0;
var dragging = false;
set.mousedown(function(event) {
ox = event.screenX;
oy = event.screenY;
set.attr({
opacity: .5
});
dragging = true;
});
set.mousemove(function(event) {
if (dragging) {
set.translate(event.screenX - ox, event.screenY - oy);
ox = event.screenX;
oy = event.screenY;
}
});
set.mouseup(function(event) {
dragging = false;
set.attr({
opacity: 1
});
});
No, you cannot install IE8 on Windows 10. If a website will only work with IE8, open Developer Tool from F12. On the Emulation tab, set User Agent to be IE8. You will have to do this every time you access this site.
there seems to be an error in the way ie8 and ie9 handle mouse move events http://css.dzone.com/news/internet-explorer-8-fix-event-
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With