change image position depending on where the mouse is how can i get it to work in ie?
<p>i was wondering if someone could shed some light as to why it isnt working on ie 8 or 9. Its workign fine on chrome and firefox.</p>

<p>Here is my code:</p>

<pre><code>var image_src = {


            middle: "background-position: 730px 0px;",
        left: "background-position: 730px 480px;",
        topleft: "background-position: 730px 960px",
        top: "background-position:730px 1440px;",
        topright: "background-position:730px 1920px;",
        right: "background-position: 730px 2400px",
            bottomright: "background-position: 730px 2880px;", 
        bottom: "background-position:730px 3360px;",
        bottomleft: "background-position: 730px 3840px;"



    };

    var Hsection = $(document).width() / 3;
    var Vsection = $(document).height() / 3;

    console.log(Hsection);
    console.log(Vsection);

    $(document).mousemove(function(event){
            var mloc = {
                x: event.pageX,
                y: event.pageY
            };

            // TOP ROW
            if( 
                (mloc.x &lt; Hsection) &amp;&amp;
                (mloc.y &lt; Vsection)
            ){
                $(".tryme").attr("style", image_src.topleft);
            }else if( 
                (mloc.x &gt; Hsection &amp;&amp; mloc.x &lt; Hsection * 2) &amp;&amp;
                (mloc.y &lt; Vsection)
            ){
                $(".tryme").attr("style", image_src.top);
            }else if( 
                (mloc.x &gt; Hsection * 2 &amp;&amp; mloc.x &lt; Hsection * 3) &amp;&amp;
                (mloc.y &lt; Vsection)
            ){
                $(".tryme").attr("style", image_src.topright);
            }

            // MIDDLE ROW
            else if( 
                (mloc.x &lt; Hsection) &amp;&amp;
                (mloc.y &gt; Vsection &amp;&amp; mloc.y &lt; Vsection * 2)
            ){
                $(".tryme").attr("style", image_src.left);
            }else if( 
                (mloc.x &gt; Hsection &amp;&amp; mloc.x &lt; Hsection * 2) &amp;&amp;
                (mloc.y &gt; Vsection &amp;&amp; mloc.y &lt; Vsection * 2)
            ){
                $(".tryme").attr("style", image_src.middle);
            }else if( 
                (mloc.x &gt; Hsection * 2 &amp;&amp; mloc.x &lt; Hsection * 3) &amp;&amp;
                (mloc.y &gt; Vsection &amp;&amp; mloc.y &lt; Vsection * 2)
            ){
                $(".tryme").attr("style", image_src.right);
            }

            // BOTTOM ROW
            else if( 
                (mloc.x &lt; Hsection) &amp;&amp;
                (mloc.y &gt; Vsection * 2 &amp;&amp; mloc.y &lt; Vsection * 3)
            ){
                $(".tryme").attr("style", image_src.bottomleft);
            }else if( 
                (mloc.x &gt; Hsection &amp;&amp; mloc.x &lt; Hsection * 2) &amp;&amp;
                (mloc.y &gt; Vsection * 2 &amp;&amp; mloc.y &lt; Vsection * 3)
            ){
                $(".tryme").attr("style", image_src.bottom);
            }else if( 
                (mloc.x &gt; Hsection * 2 &amp;&amp; mloc.x &lt; Hsection * 3) &amp;&amp;
                (mloc.y &gt; Vsection * 2 &amp;&amp; mloc.y &lt; Vsection * 3)
            ){
                $(".tryme").attr("style", image_src.bottomright);
            }

    });
</code></pre>

<p>here is a <a href="http://jsfiddle.net/gkgHk/5/" rel="nofollow">demo</a> of this code.</p>
