how to select the before element using jquery code example
Example: how select just before element in jquery
<ul>
<li>list item 1</li>
<li>list item 2</li>
<li class="third-item">list item 3</li>
<li>list item 4</li>
<li>list item 5</li>
</ul>
$( "li.third-item" ).prev().css( "background-color", "red" );