First and Last element

Submitted by:David Villa

Date added:02 July, 2012

Category:jQuery

:first and :last (take the first element or the last element)

Tags: jquery element

Code Snippet:

$(document).ready(function () {
$('span:first').css('color', '#FFFF00');
$('span:last').css('color', '#FFFF00');
});
 
 

Comments