Andy-H Posted July 14, 2010 Share Posted July 14, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/ Share on other sites More sharing options...
Adam Posted July 14, 2010 Share Posted July 14, 2010 Do you have an online demo? Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086146 Share on other sites More sharing options...
haku Posted July 15, 2010 Share Posted July 15, 2010 With animate() you can only animate to numerical values. You are using 'center' in one of your declarations. This could be what is causing your troubles. Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086200 Share on other sites More sharing options...
Maq Posted July 15, 2010 Share Posted July 15, 2010 Try running it with the IE JS debugger on. You can probably run this in FF with firebug on to see if there's and error that is only fatal in IE. Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086209 Share on other sites More sharing options...
Andy-H Posted July 15, 2010 Author Share Posted July 15, 2010 Sorry, I had to go to bed for work, I'm downloading firebug now so will try that. It's not down to the numeric value thing. I tried and it still fails in IE. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086617 Share on other sites More sharing options...
Andy-H Posted July 15, 2010 Author Share Posted July 15, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086632 Share on other sites More sharing options...
Andy-H Posted July 15, 2010 Author Share Posted July 15, 2010 Ok, I got an online demo now, moved the files to wamp... http://192.168.0.7/ Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086642 Share on other sites More sharing options...
Maq Posted July 15, 2010 Share Posted July 15, 2010 Ok, I got an online demo now, moved the files to wamp... http://192.168.0.7/ That's a local address. Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086667 Share on other sites More sharing options...
Andy-H Posted July 15, 2010 Author Share Posted July 15, 2010 Sorry, http://80.7.242.213/ Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086690 Share on other sites More sharing options...
Andy-H Posted July 15, 2010 Author Share Posted July 15, 2010 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! } ); } ); } ); Quote Link to comment https://forums.phpfreaks.com/topic/207773-ie-strikes-again-jquery-runs-as-expected-in-ff-opera-chrome/#findComment-1086711 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.