• 0

Moving background image with jQuery in FireFox


Question

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?

2 answers to this question

Recommended Posts

  • 0

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

This topic is now closed to further replies.
  • Posts

    • 47% profit margin? Wtf!! I know companies are in business to make money but come on man. I know for a fact I'll never own one of these.
    • Most AI-powered mainframe migration vendors expected to fail by 2030, Gartner warns by Paul Hill Credit: Pexels You may have read that many companies still run code written in ancient programming languages like COBOL and pay a handsome sum for those who can maintain that code. Well, it looks like this area of the tech world could be the scene of an AI bubble. It turns out that there are mainframe exit vendors, helping companies move their legacy mainframe systems to modern cloud environments or servers such as Microsoft Azure and AWS, using generative AI tooling. Unfortunately, 75% of these vendors are now expected to pivot or cease operations as market realities take hold by 2030. Alessandro Galimberti from Gartner said: Some of the companies in the mainframe exit market are IBM, 21CS, BMC, Broadcom, Rocket Software, DXC, GTSG, and Kyndryl. The reasons some of these firms are expected to quit the market are a reset of market expectations and a decline in demand for one-size-fits-all migration solutions. The reset in expectations is likely to be driven by cost overruns and threats to business, and the potential occurrence of critical failures within businesses as a result of bad transition implementations. These insights from Gartner are pretty interesting because it’s a specific area of the market where doubt is being cast on generative AI. Many people have cast doubt on whether AI companies will successfully justify the massive amounts spent on GenAI to date, and this data from Gartner suggests the road could be rocky for GenAI.
    • Heaven forbid they lose pennies from their Trillions! Like always, the consumer pays the most. Why is Tim Cooks even talking.....shouldn't he be packing up his office??
    • If you have the budget...! Some solo or indies just want to either learn or start their game and aren't in a capacity to pay salaries or to contractors... Get real.
    • Source and more 35 years old?! And if my maths is mathing, that means she was around 10 when The Ring came out?! Damn...scariest 10 year old I think I've ever seen. 
  • Recent Achievements

    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
    • Week One Done
      Harris Gilbert earned a badge
      Week One Done
    • One Month Later
      Vincian earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      537
    2. 2
      +Edouard
      168
    3. 3
      PsYcHoKiLLa
      76
    4. 4
      neufuse
      64
    5. 5
      ATLien_0
      63
  • Tell a friend

    Love Neowin? Tell a friend!