Jump to content

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


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!
                            }
                );
            }
        );
    }  
);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.