#7965 closed bug (invalid)
CSS Image-Background Hover not working in Chrome
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | css | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 (3)
comment:1 follow-up: 2 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → css |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
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.
comment:3 Changed 12 years ago by
I forgot to add a final ) in the url path "url(../images/fade.png)", which causes the image to show in most browsers except for Chrome. Just adding ) at the end of the path did the trick for me.
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.