javascript - Set style for only the first element using JQuery -
ok have set styles of section locked using :
$("section").attr("class", "xxx locked");
but want first section in page have different style :
$("section").first().attr("class", "xxx");
but doesn't work...
this first element generated dynamically document.getbyid(smtgn).value
won't work
use :first selector..
$("section:first").attr("class", "xxx");
Comments
Post a Comment