views:

268

answers:

2

I built some cross fade rollovers in IE7 using this single image technique: http://jqueryfordesigners.com/image-cross-fade-transition/

It works by placing the rollover image in the background and fading the original image state when the user rollovers the image. IE7 hates it. The rollover state shows up directly below the original image.

You can check it out here: http://hardtopdepot.com/dev/inner.html

It should be pretty obvious in IE7 but the add to cart buttons are suppossed to be Jquery rollovers. I am by no means a JS expert so Im not sure how to go about solving this problem, any suggestions would be very helpful. Thanks-

A: 

You could just use simple CSS (example here: http://sophie-g.net/jobs/css/e_buttons.htm) to do the same thing.

Or

Use Scriptaculous (http://script.aculo.us/) if you want to have fancier timed fading. This way you wouldnt have to spend time working on browser compatibility issues.

Prachi
The timed fading thing was a specific request unfortunately, so I can't wiggle out of it. Why won't I end up with browser issues with Scriptaculous?
Thomas
Since its a library, it has already taken care of all the cross browser compatibility problems. Its pretty simple to try it out. Just download and include the scriptaculous js lib on your page and apply the fade effect. You can look at the examples. Its one line of code.
Prachi
This effect ( http://wiki.github.com/madrobby/scriptaculous/effect-morph ) with CSS mentioned earlier should be all you need.
Prachi
A: 

I guess it's a bug in the plugin. They check for browser names in the plugin, which is always a bad sign (not future-proof).

Anyways, it seems like the buttons you want are just text-buttons with fading background-color. Why can't you just tweak the link to look like a button, and use the jQuery Color Animations plugin?. This solution is better for in page search and screen readers.

I've created a simple demo for you here: http://jsbin.com/egiha4/2

Source: http://jsbin.com/egiha4/2/edit

Needs some styling and a click handler or a href attribute.

gregers