Hiding and showing elements with jQuery

If you don’t know what jQuery is, I’d recommend you to visitA�jquery.com for clarification.

Suppose you have an HTML div element which you want to hide and show.

<div id='foo'>bar</div>

The next step is to use a so called selector to select the element and call the hide() function to hide the element.

$('#foo').hide();

The show() function can in turn be used to show the element.

$('#foo').show();

This entry was posted in JavaScript and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?