Modify ↓
Ticket #7174 (closed enhancement: duplicate)
Animate background-position works for left but not top
| Reported by: | jason_lau@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | effects | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
$('#obj').animate({'background-position': '20% 80%'},1000); Only the left position animates using this method. It jumps directly to the top position then animates to the left position.
Ideally, it would move to top then left or top and left simultaneously.
Change History
comment:2 Changed 3 years ago by snover
- Priority changed from undecided to low
- Status changed from new to open
- Type changed from bug to enhancement
- Component changed from unfiled to effects
- Milestone 1.4.3 deleted
jQuery currently only animates single-value properties. You may try the background-position animate plugin.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Example: http://jsfiddle.net/Jason/ZWUfJ/4/