Wednesday 15 May 2013

How to remove elements with jQuery but still keep the space it exists in -


Is there a way to hide or reveal an element with jQuery, but still keep the location on the page Takes? For example, a group of links with paragraphs below each, when the user exceeds the link, the paragraph will disappear / appear, but the paragraph form has been removed without changing the layout.

The easiest way to do this is with visiblity CSS property:

  $ ('a'). Css ('visibility', 'hidden'); css ('visibility', 'view');}, function () {$ (this) .next () );});   

$ (this) .next () may require modification to find the right element to show or hide it.

No comments:

Post a Comment