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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -