Brian Miller Posted January 26, 2012 Share Posted January 26, 2012 Using jQuery, I'm moving the background image of an HTML element when a certain event occurs. The sample code below works perfectly in IE and Chrome. However, FireFox is being a pain. $("#someItem").stop().animate({"background-position-x":"100px"}, "easeOutQuart");[/CODE] I'd hard to find info on this but on a friend told me that FF doesn't support "[b][i]background-position-x[/i][/b]" Is this true? If so, how else can I move the background image horizontally in FF? Link to comment https://www.neowin.net/forum/topic/1054159-moving-background-image-with-jquery-in-firefox/ Share on other sites More sharing options...
0 Seahorsepip Veteran Posted January 26, 2012 Veteran Share Posted January 26, 2012 background-position is more supported so something like this: $("#someItem").stop().animate({"background-position":"x y"}, "easeOutQuart");[/CODE] make sure to add IE9.js before jquery and this code to get support on IE8 and lower ;) Link to comment https://www.neowin.net/forum/topic/1054159-moving-background-image-with-jquery-in-firefox/#findComment-594610153 Share on other sites More sharing options...
0 Brian Miller Posted January 27, 2012 Author Share Posted January 27, 2012 Thanks. Link to comment https://www.neowin.net/forum/topic/1054159-moving-background-image-with-jquery-in-firefox/#findComment-594611861 Share on other sites More sharing options...
Question
Brian Miller
Using jQuery, I'm moving the background image of an HTML element when a certain event occurs. The sample code below works perfectly in IE and Chrome. However, FireFox is being a pain.
I'd hard to find info on this but on a friend told me that FF doesn't support "[b][i]background-position-x[/i][/b]"
Is this true? If so, how else can I move the background image horizontally in FF?
Link to comment
https://www.neowin.net/forum/topic/1054159-moving-background-image-with-jquery-in-firefox/Share on other sites
2 answers to this question
Recommended Posts