Log in

View Full Version : CSS Image Gallery



tpcgroup
01-07-2010, 12:37 AM
Help Needed ASAP.

CSS Image Gallery link: http://www.dynamicdrive.com/style/csslibrary/item/css-image-gallery/P10/

I am using an external .css file attached to my .html file. The rollover option works fine; however, I want to change the option from "hover" to "clickon".

This gallery states in the description...2nd to last sentence:
"Furthermore, it's possible to modify the behavior so the enlarged images are only shown onClick, though IE6 currently doesn't support this behavior well."

The behavior code is not provided...please provide "click-on" option code.

I have tried all suggestions listed, and still no luck.
1. Suggestion 1 (dated 09/01/2008)
http://www.dynamicdrive.com/forums/showthread.php?t=36114&highlight=onclick+image+gallery

2. Suggestion 2 (dated 07/04/2008)
http://www.dynamicdrive.com/forums/showthread.php?t=34052&highlight=onclick+image+gallery

Your help is greatly appreciated.

Regards,

bluewalrus
01-07-2010, 07:25 AM
As far as I know onClick is a javascript and flash element not css.

tpcgroup
01-09-2010, 11:35 PM
What javascript code to I need to add to make this css image gallery work on click?

bluewalrus
01-10-2010, 12:01 AM
You need to remove the css hover state, keep the styles and put them with a different class or id. Then with the javascript onclick event occurs add that class or id to the element. You will also need an exit/close/dismiss icon/text to close out the image. This could be down with jquery. I'd post this over in the javascript forum or ask a moderator to move it there for you.

Example of where onClick is triggered.


<a href="" onClick=""></a>