Rollover javascript for changing t shirt colors I have been reading the forums for months now, and I have received a ton of great information. It's time to give back a little, I think.
I've noticed many people are having trouble (like we did), with using a simple javascript that would make t-shirts change colors when you roll the mouse over text.
The javascripts we tried were either two part, where we had to put something in the head section, along with the body, or they wouldn't xhtml validate (which our website requires). Anything we used had to be "inline," in that it had to be simple, cut 'n pastable, reside in the "body," and easily configurable.
We simply are not code writers; all we want to do is design and sell t-shirts. But we finally put together a javascript anybody can use as a starter system, and then branch out from there as he gets more comfortable with javascript.
I wrote a blog post about it, with all the links, including a link to download the exact rollover javascript we are using. Just download the javascript and then look at our t-shirt site to see how it all works. You should be able to easily customize it for your site by replacing our images with yours, and using your own color names in place of ours.
The blog article is at greenmanblog.com/archives/157-Rollover-Javascript-for-Changing-T-Shirt-Colors.html
Hope this helps anyone just starting out with a website like we are. And, if anyone has a better rollover javascript, please let us know, will you? The color changing t-shirts are pretty much a "must have" for any t-shirt site.
Dave
Green Man T Shirts
Last edited by Rodney; October 12th, 2009 at 12:57 PM.
Reason: delinked URL
|