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 -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -