Image Occupancy Level

[Total: 0    Average: 0/5]

This shows how to set the occupancy level for an image. (NS6 only)

Body Code:

<script>

opacity=0 //opacity of image
var increase=1 //increase opacity indicator
var decrease=0 //decrease opacity indicator

function fade(){
if (opacity<80&&increase)
opacity+=5
else{
increase=0
decrease=1
}

if (opacity>30&&decrease)
opacity-=5
else{
increase=1
decrease=0
}

document.getElementById("test").style.MozOpacity=opacity+"%"
}

if (window.sidebar)
setInterval("fade()",100)
</script>

<img id=test name=test src="/js/pic1.gif">

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *