var e = document.getElementById('contentLinks'); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; not working code example
Example: javascript display block
document.getElementById("someElementId").style.display = "block";