How do I get unique selectors for a group of previous selected elements?

How do I get unique selectors for a group of previous selected elements?

Hi,

I have a selector that looks like this:

var $inputEl = $(this).closest('.form').find('input[type="text"]');

As you can see it return a number of input elements.

Each input elements has a parent .input-control class, but more than one input element can exist in a single input control.

  1. <div class="form">
  2.     <div class="input-control">
  3.          <input>
  4.         <input>
  5.     </div>
  6. </div>

From my list of $inputEl, I want to get a unique list of .input-control. I'm a casual jquery/javascript user so would appreciate some advice on how to do this best.

Thanks