Javascript
- Started
- Last post
- 11 Responses
- madino
I am trying to compile a good list of javascript code for personal reference. And I can't seem to find the best javascript for roll overs... any suggestions. Right now I am using this http://www.madino.com/roll/ **view source **
I am trying to avoid the dreamweaver code, because I can't understand it...
- tomkat0
looks fine.. thats what i use also
- mrock0
use CSS you'll have better control and the page load will be minimal. http://www.alistapart.com/articl… I go here for a reference.
- madino0
yes... css is good, but there are still some bugs there.
I just want a very simple rollover that will work on all browsers.
I think there are still issues with css and mozilla...
- atomica0
The CSS method is uber buggy if you do a horizontal. I use a very similar jscript as yours madino, I think you're alright using that.
- ldww0
css rollovers look like crap.
- jevad0
I use youngpups rollover script...it's clean as shit....
- mrock0
well depending on your targeting audience. You can't go wrong with doing scripts, but you'll need to think about weight on the page. Writing scripts for just rollovers is frivolous when you you can just have the browser do it. Aside from you doing more work, jsut my .3cents.
- madino0
hmm... interesting... comments.
I just want clean, light code, that works.
:)
- versa0
function preload(imgObj,imgSrc) {
if (document.images) {
eval(imgObj+' = new Image()')
eval(imgObj+'.src = "'+imgSrc+'"')
}
}function changeImg(imgName,imgObj) {
if (document.images) {
document.images[imgName].src = eval(imgObj+".src")
}
}
- madino0
youngpups rollover script??
Link? Pretty Please...
- mrock0
a{
background:url("../images/???_of... no-repeat top left;
}a:hover{
background:url("../images/???_ov... no-repeat top left;
}a:active{
background:url("../images/???_do... no-repeat top left;
}scriptless....