Read more

Show or hide a jQuery element given a condition

Henning Koch
October 13, 2015Software engineer at makandra GmbH

If you have jQuery code like this:

if (condition) {
  $element.show();
} else {
  $element.hide();
}
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

... you can shorten this to:

$element.toggle(condition);
Posted by Henning Koch to makandra dev (2015-10-13 12:05)