forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: jasendorf on October 30, 2003, 08:26:15 pm

Title: Interesting Javascript I came across...
Post by: jasendorf on October 30, 2003, 08:26:15 pm
I thought this Javascript I came across looked kind of interesting...

See a sample here:

http://www.338tharmyband.com/highlight.html

Could be used on thumbnail photos to create an interesting effect...  just a thought.

John
Title: Interesting Javascript I came across...
Post by: lasa on October 30, 2003, 08:46:53 pm
Nice effect.
I think it is nice with a litte blending, not much.

Here is the code:
Code: [Select]

<SCRIPT language=JavaScript1.2>
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
</SCRIPT>

Code: [Select]

<img onMouseOver=high(this) style="FILTER: alpha(opacity=30)" onMouseOut=low(this) src="image.jpg" width="100" height="100" />
Title: Interesting Javascript I came across...
Post by: rbl on October 30, 2003, 08:57:55 pm
Mind you that it's IE Win only, if I'm not mistaken.
I use the same effect on my site for visited photos.
Title: Interesting Javascript I came across...
Post by: Titooy on October 30, 2003, 11:04:26 pm
Here is another version that works with IE and NS7
http://www.ceciledefrance.net/photo2.php?section=photo&theme=film&fiche=9
(but still not with Opera)
Title: Interesting Javascript I came across...
Post by: rbl on October 30, 2003, 11:08:18 pm
Very nice! =)
Works on Mac with mozilla based browsers also.
Title: Interesting Javascript I came across...
Post by: Tarique Sani on October 31, 2003, 04:03:45 am
Quote from: "Titooy"
Here is another version that works with IE and NS7
http://www.ceciledefrance.net/photo2.php?section=photo&theme=film&fiche=9
(but still not with Opera)

Well atleast it mozilla the shading back works only if I mouse over to the next  picture - as long as it doesn't give a JS error in any browser it can be used....

However making it main stream - I am a bit reluctant
Title: Interesting Javascript I came across...
Post by: jasendorf on October 31, 2003, 05:17:53 am
I just thought it was interesting that's all...   not trying to force it into CPG...
Title: Interesting Javascript I came across...
Post by: Joachim Müller on October 31, 2003, 05:46:29 am
I think many people are interessted in such stuff, although it doesn't belong in Coppermine mainstream.
If it's done properly, it won't hurt any browser that can't display it, so why not make a mod out of it and post it in the mods/addon board?

GauGau
Title: Interesting Javascript I came across...
Post by: Tarique Sani on October 31, 2003, 07:22:38 am
Yes a mod would be great!! I would like to see it in the flimstrip as well :)
Title: Interesting Javascript I came across...
Post by: Tarique Sani on October 31, 2003, 07:23:50 am
Yes a mod would be great!! I would like to see it in the flimstrip as well!\

Psstt... John I am not accusing you, stressed out? ;)