I hope this question is not too opinionated.

I want to hide a few elements on a Visualforce page, when a checkbox or button was clicked.
Would it be "overkill" or bad practice if I include the jQuery library for that?

1 Answer 1


It always must be the best practice to keep software light but provide high performance.

If something can be done natively and independently then we should go with that approach.

Here, you can hide elements by 3 ways:-

  1. rendered attribute of visualforce tags. This is 100% native. Browser independent. (best)
  2. Change CSS by Javascript. Does not require additional libraries. Browser dependent. What if I disable javascript. (better)
  3. Change CSS by Jquery. Need to add Jquery library. Page load will increase by few ms to load a additional third-party file now. (fine)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .