Just looking for a little help (css & javascript)
Hi everyone
i've got this page that i'm developing http://sky.prohosting.com/evilgit and what i was after is a way of making an image rollover for the entries section (if you go to entries and then paintoff 1) edit the direct link is here http://sky.prohosting.com/evilgit/entries1.html
basically what i have is a table of thumbnails that i'd like as a negative (well actually as an old photo all brown and grey) which i've done for each thumbnail. can someone point me in the right direction to work out the code that i need to change the negative rollover to the colour one (that's the one that's there now) when the mouse is hovered over it, just like the buttons i made to the left hand side. i have tried using the same code (well with different numbers, because otherwise they would just replace the ones i have as nav buttons wouldn't they?
the basic code is written in a mixture of css and html (mostly css for the links and layout of the site), but i just can't seem to get my head around this javascript problem.
anyway please help
sorry can't think of a way around this but there has to be a way surely.
the code (if this helps) is this so far for the buttons
<script LANGUAGE="JavaScript">
</script>
in the head section and in the body section
thisnew posted this at 14:21 — 17th March 2005.
They have: 8 posts
Joined: Feb 2005
I haven't tested this so I don't know if it'll work, but might give you another entry point to the problem.
<?php
<script type='text/javascipt'>
function toggleColor(img) {
srcName = img.src.split('_')
if (srcName[0]=='col')
img.src = 'neg_' + srcName[1]
else
img.src = 'col_' + srcName[1]
}
</script>
<img src='neg_14.jpg' onMouseOver='toggleColor(this)' onMouseOut='toggleColor(this)' />
?>
evil git posted this at 10:13 — 22nd March 2005.
They have: 2 posts
Joined: Mar 2005
well i'll give it a try.
i tried my script out on a test site with just the one set of rollovers and it worked, which is good. except i have a set of buttons in a nav area. when i try and combine them both then only the buttons work and not the one with the pictures.
driving me mental it is.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.