Change PH to F... wrote:
I am working on some code that is currently in javascript that I would
like to be able to do in CSS if possible and 100% eliminate JS. At the
URL http://www.aerosmithfans.com/index2.html there is a series of 4 CD
cover images with a scroll button on each side. When the user clicks
the button, the selection of the four CD covers changes. Is there a way
to code this so that it is purely CSS and no JS what-so-ever? If so can
someone please point me to a site that describes what I need? Thanks
because right not this -> http://www.pczero.net/hello.html <- is how I
am feeling!
Maybe a CSS guru can do the job, but it may be useful to describe the
issue you are trying to overcome - CSS may not be the solution.
Depending on your reasons, it might also help to post in
comp.lang.javascript. Most of the code in the page can be significantly
reduced - for example, the 50-odd lines of 'CacheCDCovers()' can be
replaced with:
var imagemain=[];
function CacheCDCovers2()
{
var i=0;
while ( i<25 ){
imagemain[i] = new Image();
imagemain[i].src = 'imgs/cd' + (++i) + '.jpg';
}
}
Browser sniffing such as:
if (parseInt(navigator.appVersion)>=3) {
is completely unnecessary (and quite useless - Firefox 1.0.6 reports as
5.0).
The scroll left/right function can be achieved in about 10 lines (or
less). The page can remain fully functional if scripting is unavailable.
--
Rob