-1

I am trying code as mentioned in below link.

http://codepen.io/relfor/pen/qKjpL

This is working in Chrome. But not in FF. Any idea why this is happening?

Note : I am trying in MAC FF.

FF that I have is the latest version. 23.0.1

enter image description here


To get it working with all browswer, I did below

css

#offerId1 {
    background-position-x:-65px;
    background-position:-65px;
}

javascript

setInterval(function(){
    $('#offerId1').animate(
    {'background-position-x':'300px', 'background-position':'300px'},
    2000,
    function(){
        $('#offerId1').css('background-position-x','-65px');
        $('#offerId1').css('background-position','-65px');
    })}, 1800)
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276

1 Answers1

1

Your code is working perfectly it's your css not working try this I have try this hope this work backgroundPositionX not working on Firefox

Try this at js part and you will see it's working

setInterval(function(){
$('button').animate(
  {'background-position-x':'300px'},
  2000,
  function(){
    $('button').css('background-position-x','-65px').css('color','black')

  })}, 1800)

That was just a guideline. This is working see http://codepen.io/arifmahmudrana/pen/Eoefn

Community
  • 1
  • 1
ARIF MAHMUD RANA
  • 5,026
  • 3
  • 31
  • 58