How to hide or display content in html tag using javascript and css.

We can use javascript to apply dynamic css property to hide or display html element .

document.getElementById(’testId’).style.display=’none’ // This will hide content in our element which has id “testId”
and
document.getElementById(’testId’).style.display=’block’ // This will show content in our element if display property is already none.

Read the rest of this entry »