9 – Using jQuery to hide fields in a view

I have several parent and child taxonomy vocabulary terms in a content view. I would like to hide all of the unrelated child terms when a certain parent is selected. Is there a way I can do this via a jQuery script? Here’s what I have so far.

(function ($, Drupal, drupalSettings) {

  'use strict';

  Drupal.behaviors.hideFields = {
   attach: function (context, settings) {
         if ($('.views-exposed-form-page-1#edit-tid--TID').attr("selected, selected")) {
                    $('#NID(value=" + City + ")').hide();