<html>
<head>
<script src="https://libs.baidu.com/jquery/1.10.2/jquery.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>