Assign class to item query.