Fading image script

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Fading image script
Kmarion
CZ Newbie
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Oct 26, 2003
0.00 posts per day
Posts: 6
Points: 1,079
   
I am looking for the script that changes the opacity of the image with mouse over. (such as the one in the site supporters block of this site.) Thank you. Sorry if I missed it..




_________________
Back to top Reply with quote
#2   re: Fading image script
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Save this as fader.js

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}


Call it in your <HEAD>

<S CRIPT LANGUAGE="javas cript" SRC="../js/fader.js">
</S CRIPT>


Remove the spaces from the words script.

Then in your image tag add this:

<a href="blah.html"><img onmouseover=high(this) style="FILTER: alpha(opacity=30); moz-opacity: 0.3" onmouseout=low(this) src='blah.gif' border='0'></a>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Fading image script
Kmarion
CZ Newbie
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Oct 26, 2003
0.00 posts per day
Posts: 6
Points: 1,079
   
Is there a way to apply it to all images such as on your homepage. I'm thinking you did not re-write every image tag out. Really I just want it to work within my site supporters block. Thx again
[ Register or login to view links on this board.]




_________________
Back to top Reply with quote
#4   re: Fading image script
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Each Image is defined. icon_wink.gif




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Fading image script
Kmarion
CZ Newbie
Age: 49
Gender: Male
Website:
Status: Offline
Joined: Oct 26, 2003
0.00 posts per day
Posts: 6
Points: 1,079
   
Doh!..lol..thank you sir




_________________
Back to top Reply with quote
#6   re: Fading image script
rld1025
CZ Newbie
usa.gif tennessee.gif
Age: 58
Gender: Male
Status: Offline
Joined: Sep 07, 2003
0.00 posts per day
Posts: 14
Points: 2,102
AIM Address   
Telli,

I am tryig to add the fading function to my referrers block also. I keep getting an error

Parse error: parse error, unexpected T_STRING in /www/e/ebattles/htdocs/blocks/block-Supporters_Up.new.php on line 23


here is my block, can you see what I need to change?


Parse error: parse error, unexpected T_STRING in /www/e/ebattles/htdocs/blocks/block-Supporters_Up.new.php on line 23


Thanks

Bob


Back to top Reply with quote
#7   Re: re: Fading image script
rld1025
CZ Newbie
usa.gif tennessee.gif
Age: 58
Gender: Male
Status: Offline
Joined: Sep 07, 2003
0.00 posts per day
Posts: 14
Points: 2,102
AIM Address   


Originally posted by rld1025 @ Sat Oct 23, 2004 12:38 pm:

Telli,

I am tryig to add the fading function to my referrers block also. I keep getting an error

Parse error: parse error, unexpected T_STRING in /www/e/ebattles/htdocs/blocks/block-Supporters_Up.new.php on line 23


here is my block, can you see what I need to change?


Parse error: parse error, unexpected T_STRING in /www/e/ebattles/htdocs/blocks/block-Supporters_Up.new.php on line 23


Thanks

Bob


Ok, I took one step.. I have the fader working in the block, but the link does not highlingt onmouseover.. I'll take another look tonight.


Back to top Reply with quote
#8   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Sorry I missed this post which link isnt highlighting? The opacy fader is only for images.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: Fading image script
rld1025
CZ Newbie
usa.gif tennessee.gif
Age: 58
Gender: Male
Status: Offline
Joined: Sep 07, 2003
0.00 posts per day
Posts: 14
Points: 2,102
AIM Address   
Telli,

Ok, I copied the block from e-clans to e-battles. It works fine on e-battles, but not on e-clans. I double checked that the CZfader.js file is the same on both sites and it is. They are hosted on different machines.. Any ideas?


[ Register or login to view links on this board.]


$content  .=  "<a href=\"http://e-clans.com/\" target=\"_blank\"><img onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this) border=0 src=\"images/CZlinks/buttonec1.gif\" alt=\"Powered by e-clans\" width=88 height=31></a><BR><BR>";


Thanks

Bob


Back to top Reply with quote
#10   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Where is the actual call to the fading.js? Do you have it in the includes/my_header.php?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum