I have following HTML:

```
<ul class="sidebar-menu" >
    <li class="treeview active">
        <a>Sales</a>
        <ul class="treeview-menu"
            <li>Distributor Wise Sales</li>
        </ul>
    </li>
    <li class="treeview active">
        <a>Purcahse</a>
        <ul class="treeview-menu"
            <liPurchase Sales</li>
        </ul>
    </li>
</ul>

```

I want to show `active` class when user click on 'Purchase' or 'Sales'. Ie. when a user clicks on 'Purchase' or 'Sales' then the 'Purchase' link will be active. How could I achieve this using jQuery. Can anyone help?