How to add first and last classes to local task items?
You can use jQuery :first and :last selectors, example:

$('ul li:first').addClass(‘first’);
$('ul li:last’).addClass(‘last’);


Or you can use CSS :first-child and :last-child selectors, example:

li:first-child { add your css here }
li:last-child { add your css here }


The CSS way will give better performance.