Change style of all elements with particular class apart from the first one?
Let's say I have the HTML
<div class="ms-rtelong"></div>
<input type="text" name="fname"></input>
<input type="text" name="lname"></input>
<div class="ms-rtelong"></div>
<div cl开发者_StackOverflow社区ass="ms-rtelong"></div>
<div class="ms-rtelong"></div>
With
$('.ms-rtelong').css({'width':'650px', 'height':'300px'});
If I want to change the size of all div's but want to leave the first one as it is, how can I do this?
Thanks in advance.
The :gt() selector should do it:
$('.ms-rtelong:gt(0)').css({'width':'650px', 'height':'300px'});
精彩评论