Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8505009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:11:54+00:00 2026-06-11T02:11:54+00:00

I seem to experiencing a problem with the JQuery animation. I can animate the

  • 0

I seem to experiencing a problem with the JQuery animation. I can animate the background image in the positive direction, but not in the negative direction. Any suggestions as to how to remedy this?

$(this).parent().css('background-position-y', '19px');
$(this).parent().animate({ 'background-position-y': '-=19px' }, 1000, 'linear');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:11:55+00:00Added an answer on June 11, 2026 at 2:11 am

    Positioning the background via separate background-position-x/y is a feature that Internet Explorer introduced but never made it into a W3C specification. Any recommendations to add it to the spec have since been denied.

    See:
    http://snook.ca/archives/html_and_css/background-position-x-y

    You can always create your own little plugin, it’s not that hard.

    Using jQuery 1.8 we now have access to the $.Animation method that gives us the animated values directly without to much work, so we can do something like :

    $.fn.animateBG = function(x, y, speed) {
        var pos = this.css('background-position').split(' ');
        this.x = pos[0] || 0,
        this.y = pos[1] || 0;
        $.Animation( this, {
            x: x,
            y: y
          }, { 
            duration: speed
          }).progress(function(e) {
              this.css('background-position', e.tweens[0].now+'px '+e.tweens[1].now+'px');
        });
        return this;
    }
    

    And then to use it we can do:

    $("#background").animateBG(x-value, y-value, speed);​
    

    FIDDLE

    This is something I whipped up for another answer some days ago, and only works with pixels and does have some limitations, but it’s simple and should work for most cases.

    I guess something like this would do what you want:

    $(this).parent()
           .css('background-position', '0 19px');
           .animateBG(0, 0, 1000);​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm experimenting with Spring Mobile but I can't seem to get the basic example
Seem to run into a service endpoint not found problem when trying to get
I'm currently experiencing problems with static content - most noticeably jQuery datepicker images, but
I'm experiencing this weird problem reading data from a table called nodes. Any select
I'm experiencing the same problem in this previous stackoverflow.com post . Specifically, I seem
I am currently experiencing a weird caching problem it would seem. When I load
This may not seem like a development question but there is a link. I
I must be missing something totally obvious but I can't seem to get the
I'm experiencing a bizarre and frustrating scenario and I can't seem to track it's
I am experimenting with WPF and I came across a problem I can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.