Set style for only the first element using JQuery [closed]

Use the :first selector..

$("section:first").attr("class", "XXX");

Leave a Comment