<!DOCTYPE html>
<html>
<head>
<script src="/lib/jquery-1.12.2.min.js"></script>
<script>
$(document).ready(function(){
$("ul.test > li").css("border", "4px double");
});
</script>
</head>
<body>
<ul class="test">
<li>List item</li>
<li>List item
<ul>
<li>Nested list item (will not have border)</li>
</ul>
</li>
<li>List item</li>
</ul>
</body>
</html>