Hi, I don’t even know how to describe this error, cause I am getting weird line numbers when IE7 tries to tell me where the error is. I basically have an absolutely positioned element that needs to be able to be dragged horizontally. I use this code and it works like a charm in Firefox and Safari, but not IE7:
[CODE]window.onload = function() {
var a = new Draggable(‘bar’, {
starteffect: false,
endeffect: false,
zindex: 0,
snap: function(x, y, draggable) {
var element = draggable.element.getDimensions();
var parent = draggable.element.parentNode.getDimensions();
return [
(x > 200) ? 200 : (x < (parent.width – element.width)) ? (parent.width – element.width) : x,
parent.height – element.height – 40
];
}
});
}
The code is pretty much straight out of a tutorial, and I have no idea why it doesn’t work in IE7. IE7 tells me the problem is in line “var element = draggable.element.getDimensions();”, but I am not that sure cause it has pointed me to blank lines before ? Does anybody know what the problem is? Is my browser on crack?
Thanks.