i'm currently having issue with the getElementsByClassName property. I have a show and hide function which displays a button when you hover over the product click here I have enabled this function using the getElementById property, however due to the fact i want to duplicates of this function using a class is better practice. Is the code below the correct way to address this problem using the ClassName JS function?
Also i've been reading getElementsByClassName is not supported in IE8 is this true and is there a way to work around this?
<script>
function show(viewProductBtn){
document.getElementByClassName(viewProductBtn).style.visibility = "visible";
}
function hide(viewProductBtn) {
document.getElementByClassName(viewProductBtn).style.visibility = "hidden";
}
</script>
<!--HTML-->
<div class="product-shot-bg" onMouseOver="show('viewProductBtn')" onMouseOut="hide('viewProductBtn')">
<a href="#" class="viewProductBtn"></a>
at present i've switched the my dev site back to getByID to demonstrate how the transition should work..