|
-
Nov 13th, 2002, 11:33 AM
#1
Thread Starter
Fanatic Member
(JAVASCRIPT HELP) Fading Link
I downloaded a script from Planet Source Code to fade my links when moused over. Here is the relavant code I need help with:
Code:
function domouseover() {
if(document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(startColor,endColor,srcElement.uniqueID,stepIn);
}
}
I have bolded the portion in question. How can I make it where the event, "domouseover()" only occurs if the element has "onmouseover='domouseover()'"? Right now, every link on my page fades in and out and that is undesirable. Also, where can I get resources telling me how to do this kind of stuff myself? Thanks, Jeremy
He who listens well, speaks well.
-
Dec 5th, 2002, 11:35 PM
#2
Member
Code:
<a href="page.html" onmouseover="doMouseOver('#FFFFFF','#000000',this,?>Link</a>
function doMouseOver(obj) {
if (document.all) fade(startColor,endColor,obj,stepIn);
}
That should work, but I'm not sure how your fade() function is coded. If it doesn't work, paste the function so I can see what it's doing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|