I can't find out how exactly how parent selector works in jQuery.

```js
var test = $( "p:contains('Lorem ipsum dolor sit amet')" ).parentsUntil("span");

    test.css({ "border" : "1px solid red"});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
       <p>Title</p>
       <span>
        <p>Span</p>
        <div>
         <p>Div</p>
         <p>Lorem ipsum dolor sit amet</p>
        </div>
       </span>
       <tr>
        <th>Xx</th>
        <td>YY</td>
       </tr>
      </table>
```

How to get border around span? My code doesn't work.