js update for sidebar