border: 2px solid lightgrey;
<script src="http://edu.jb51.net/libs/jquery/1.10.2/jquery.min.js">
$(document).ready(function(){
$("span").parents("ul").css({"color":"red","border":"2px solid red"});
<body class="ancestors">body (great-great-grandparent)
<div style="width:500px;">div (great-grandparent)