11:49:57 PM
Wednesday
Sep 08
Su M Tu W Th F Sa
567891011
12131415161718
19202122232425
262728293012
3456789

Play My Typing Game

View Some of My Artwork

Cross Browser Opacity Control with JavaScript
Here's a cross browser function to set the opacity of a div/image/whatever that has an id="SomeName" so it can be uniquely referred to. Set opacity value anywhere from 0-100. MozOpacity is a Netscape/Firefox thing, KhtmlOpacity is a Linux Konqueror thing, and filter is a Microsoft thing. This short function hits them all.

<script type="text/javascript">
function change_opacity( id, opacity )
{
        var o = document.getElementById(id).style;

        o.opacity = ( opacity / 100 );
        o.MozOpacity = ( opacity / 100 );
        o.KhtmlOpacity = ( opacity / 100 );
        o.filter = "alpha(opacity="+opacity+")";
}
</script>


Read Previous:
Scroll To Top of Page with JavaScript
Read Next:
Acquire GET Variables
Table of Contents


Give a listen to my music...
My Best Recordings
How my services and skills can help you:
  • Global (via Email/Skype/AIM(ichat)/Yahoo)
    • Web Development Consulting
    • Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
    • Cellphone App Development (Android/MobileWeb)
    • Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
    • Music - Soundtrack Composition & Voice Work
  • Local
    • Most all the above, but also:
      • Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
      • Recording Live Music Audio
      • Video Streaming live music and other live events anywhere that can provide wifi
      • Training Video Streaming to your venue's trusted soundperson
Skills:
  • Global (via Email/Skype/AIM(ichat)/Yahoo)
    • Web Development Consulting
    • Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
    • Cellphone App Development (Android/MobileWeb)
    • Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
    • Music - Soundtrack Composition & Voice Work
  • Local, Most all the above, but also:
    • Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
    • Being your venue's soundman
    • Video Streaming live music and other live events anywhere that can provide wifi
    • Training Video Streaming to your venue's trusted soundperson