Simplified the conditional where the selected li option is highlighted