JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>I'm the first child</li>
    <li><a href="#">Click Me</a></li>
</ul>
<p id="a">Elements are equal? <span></span><p>   
<p id="b">$(this).prev().text(): <span></span><p>    
<p id="c">$(this).siblings(":first-child").text(): <span></span><p>

CSS

li { 
    cursor: pointer;
}

li a {
    color: blue;       
}

p {
    color: #777;
    margin-top: 10px;
}

li, span {
    color: green;    
}

JavaScript

$('li').live("click", function() {
    var equal = $(this).prev() === $(this).siblings(":first-child");
    $("#a span").text( equal );
    $("#b span").text( $(this).prev().text() );
    $("#c span").text( $(this).siblings(":first-child").text()  );
});