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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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