you don't need the ``[0]``. You can pass the jquery collection to ``.is()``. The collection return by ``.closest`` has at most as many elements as the original collection anyway (as it can find 0 or 1 closest matching parent for each element in the collection) so it will only contain 0 or 1 element here.