Skip to main content

Bug Tracker

Side navigation

#7755 closed bug (invalid)

Opened December 12, 2010 12:55PM UTC

Closed December 28, 2010 08:01AM UTC

Last modified March 13, 2012 08:39PM UTC

animate with background-position and negative top position does not work

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: 1.next
Component: effects Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

If you try to animate a background-image by background-position and the initial-Y-position of the background is negative, then the animate-command will start at zero instead at the y position.

image.css({'background-position': '200px -200px'});
image.animate({'background-position': '0px 0px'}, 5000);

As you can see in this example the background will be first set to 200px -200px and then when the animation begins it jumps to 200px 0px and animates to 0px 0px.

Attachments (0)
Change History (10)

Changed December 13, 2010 07:00PM UTC by jitter comment:1

owner: → anonymous
status: newpending

You might want to checkout the jQuery-cssHooks plugin (bgpos.js) which uses the new cssHooks functionality to animate background-position correctly. The documentation of css() and animate() clearly state that at the moment only properties which are

a single numeric value

are supported.

If the plugin works out for you might also try to do this yourself using the animate() step callback. Please report back if this suggestion work out for you.

Changed December 28, 2010 08:01AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed January 17, 2011 01:51PM UTC by jitter comment:3

#7951 is a duplicate of this ticket.

Changed February 03, 2011 03:46PM UTC by jitter comment:4

component: unfiledeffects
milestone: 1.61.next
priority: undecidedlow

Changed February 07, 2011 11:13PM UTC by jitter comment:5

#8160 is a duplicate of this ticket.

Changed February 09, 2011 07:55PM UTC by jitter comment:6

#7174 is a duplicate of this ticket.

Changed May 04, 2011 04:49PM UTC by zachstronaut comment:7

If the main jQuery animate() function cannot support all standard cross-browser CSS properties, and we have to install hooks piecemeal to support those other properties, why have animate() be a part of core jQuery at all?

I move for jQuery animate() to support multiple value CSS properties by default or for animate() to be extracted from jQuery core.

Changed November 16, 2011 02:18PM UTC by timmywil comment:8

#10802 is a duplicate of this ticket.

Changed January 18, 2012 12:28AM UTC by mikesherov comment:9

#11088 is a duplicate of this ticket.

Changed February 01, 2012 10:33PM UTC by timmywil comment:10

#11270 is a duplicate of this ticket.