我能';不要让jQueryRotate与IE8一起工作

我能';不要让jQueryRotate与IE8一起工作,jquery,internet-explorer,animation,rotation,Jquery,Internet Explorer,Animation,Rotation,这个问题取代了我几天前发布的前一个问题。我已经重写了我的代码,完全删除了HTML5画布 我正在努力让jQueryRotate与IE一起工作。我的代码在Firefox和IE9中都可以工作,但得到了一个 'parentNode' is null or not an object - in IE8. XHair、yHair定位十字准线,mousemove函数中的其余代码计算枪的角度 $wrapper.mousemove(function(e){ xHair=e.pageX-45;

这个问题取代了我几天前发布的前一个问题。我已经重写了我的代码,完全删除了HTML5画布

我正在努力让jQueryRotate与IE一起工作。我的代码在Firefox和IE9中都可以工作,但得到了一个

'parentNode' is null or not an object - in IE8.

XHair、yHair定位十字准线,mousemove函数中的其余代码计算枪的角度

    $wrapper.mousemove(function(e){
    xHair=e.pageX-45;
    yHair=e.pageY-45;
    xGPos    = xHair/4+280;
    yGPos    = yHair/4+200;
    difx     = xHair-(190+xGPos);
    dify     = yHair -(185+ yGPos); 
    radians  = Math.atan2(dify,difx);
    //rotation = radians+2.36; //rotation in radians
    rotation = (((radians*180)/Math.PI)+135); //rotation in degrees
    //console.log(rotation);
});
在JSFIDLE上,如果$gun.rotate行中的任何一行被注释掉,代码就可以工作

    function shotGun(){
    //$gun.rotate({angle:rotation});
    //$gun.rotate({angle:45});         
    $gun.css('margin-left', xHair/4+280);
    $gun.css('margin-top', yHair/4+200);
}