Ja'far b. Muhammad told on his father’s authority that when al- Hasan b. ‘All was sitting a bier was brought past him and the people stood up till the bier had gone by. Al-Hasan then said, “A bier carrying a Jew was brought past when God’s messenger was sitting in its path, and just because he did not like having a Jew’s bier higher than his head he stood up.” Nasa’i transmitted it.
Source: sunnah.com
Other translations
Arabic
وَعَنْ جَعْفَرِ بْنِ مُحَمَّدٍ عَنْ أَبِيهِ أَنَّ الْحَسَنَ بْنَ عَلِيٍّ كَانَ جَالِسًا فَمُرَّ عَلَيْهِ بِجَنَازَةٍ فَقَامَ النَّاسُ حَتَّى جَاوَزَتِ الْجَنَازَةُ فَقَالَ الْحَسَنُ: إِنَّمَا مُرَّ بِجَنَازَةِ يَهُودِيٍّ وَكَانَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَى طَرِيقِهَا جَالِسا وَكره أَن تعلوا رَأسه جَنَازَة يَهُودِيّ فَقَامَ. رَوَاهُ النَّسَائِيّ
sunnah.com