He danced NAKED before the Lord. NAKED. NAKED. NAKED. He CLAPPED his hands. My God, David was an ass. /sarcasm
Guess again, sister.
David was dancing with all his might before the Lord wearing a linen ephod . .
"And David was girded with a linen ephod." On this auspicious occasion, David laid aside his royal robes, and as taking the lead in the worship of God he wore a linen ephod. This was the ordinary garb of the priests when officiating, yet it was also used in religious exercises by those who were not priests, as the case of Samuel shows: 1 Samuel 2: 18
(Commentary by Arthur Pink).