View Single Post
Old 02-22-2013, 06:30 PM   PM User | #5
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,461
Thanks: 52
Thanked 457 Times in 455 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
one of the best ways to deal with things like lists is to iterate over them with the each method, which keeps an index that you can use to operate on elements according to their position:

Code:
$(".ui-tabs-nav li").each(function (idx) {
    if (idx != 3) {
        $(this).remove()
    } else {
        $(this).text("whatever")
    }
});
xelawho is offline   Reply With Quote