Snippets v2

Languages
My Snippets

Show a hidden element using CSS Style Login or Register to Bookmark this snippet

Description Javascript

This function uses the CSS property 'display' to show the element supplied.

elm can be an id as string or object reference. Required xGetElementById (available on this site).

The Code Download
  1. function jShow(elm) {
  2.     //firstly check that elm is a reference or a text.
  3.     if(typeof(elm) == 'string') {
  4.         elm = xGetElementById(elm);
  5.     }
  6.     elm.style.display = 'block';
  7. }
Credits Contact JC

Added by JC on 11th November, 2007

Comments

There are no comments about this snippet.

Post Comment HTML is allowed

You must be registered and logged in to post a comment.

Login here to post a comment