0

How do I modify the below code to hide all fields except the ones needed to be shown? Have 20 more fields do not one to name them one by one to hide.

   $(document).ready(function() {
$('nobr:contains("stuff1")').closest('tr').show();
$('nobr:contains("stuff2")').closest('tr').show();
//Hide the rest of the fields without mentioning their names
0

Hide all the fields using CSS display:none and enable the ones you need using JQuery.

  • JQuery is not enabling the fields...believe the CSS is blocking all the fields...anyway to get around this? How do I trigger CSS first and then JQuery? – John D Oct 18 '16 at 21:22
  • CSS should always execute first. Place any <link> elements above any <script> elements in the <head>. – IE5Master Nov 15 '16 at 15:45
0

For anyone who is wondering what I did...I ended up just hiding each field that needs to hidden.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.