Ticket #7965 (closed bug: invalid)
CSS Image-Background Hover not working in Chrome
| Reported by: | robertnealan@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | css | Version: | 1.4.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When an anchor tag has a image background applied to it, attempting to swap it for another image on mouse hover results in no background when there's an underscore in a transparent png file (ex: ../images/fade_hover.png) in Google Chrome (Build 8.0.552.231). Removing the underscore from the file name resolves the issue.
$('a.toggle').hover(
function() { $(this).css("background-image", "url(../images/fade_hover.png)"); }, function() { $(this).css("background-image", "url(../images/fade.png)"); }
);
Change History
comment:2 in reply to: ↑ 1 Changed 2 years ago by jitter
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to css
Replying to anonymous:
Scratch that last. Turns out it's an issue with the url path. Attempting to do a ../ to go up one folder is causing the problem, while putting in the full image url resolves the issue.
I assume you are the same person as the original reporter and that you request this ticket to be closed as it wasn't a jQuery bug.
If you didn't want this ticket to get closed please report back and demand the reopening of this ticket and also provide a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Scratch that last. Turns out it's an issue with the url path. Attempting to do a ../ to go up one folder is causing the problem, while putting in the full image url resolves the issue.