Jump to content

IE strikes again... JQuery, runs as expected in FF, Opera, Chrome.


Andy-H

Recommended Posts

But in IE it does absolutely NOTHING, I get an ActiveX warning, accept the content yet it still does nothing.

 

 


$(document).ready(
    function()
    {
        $("a.menu").hover(
            function()
            {
                $(this).animate(
                {
                padding: "8px 175px 0 0",
                backgroundPosition: "0px center"
                }, 1000,    function()
                            { 
                                //done!
                            }
                );
            }
            ,
            function()
            {
                $(this).animate(
                {
                padding: "8px 0 0 175px",
                backgroundPosition: "175px center"
                }, 1000,    function()
                            { 
                                //done!
                            }
                );
            }
        );
    }
);

 

 


        <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
        <script type="text/javascript" src="js/menu.js"></script>

 

 

Can anyone spot where I'm going wrong and point it out to me? First time I've tried JQuery (I know, way behind the times but I'm lazy...)

 

 

Thanks for any help.

I dont know how to use this firebug, it's way too confusing. From what I can see there are no javascript errors or warnings tho. I can't find anything about IE debugger in firebug. And sorry I don't have a demo online :S.

Problem solved. IE had beef with me changing the padding, which was only neccessary when I was using text along with the images for SEO but it didn't work out. Anyway, thanks.

 

$(document).ready(
    function()
    {
        $("a.menu").hover(
            function()
            {
                $(this).animate(
                {
                    backgroundPosition: "0px center"
                }, 1000,    function()
                            { 
                                //done!
                            }
                );
            }
            ,
            function()
            {
                $(this).animate(
                {
                    backgroundPosition: "175px center"
                }, 1000,    function()
                            { 
                                //done!
                            }
                );
            }
        );
    }  
);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.