I am not sure if I can do this or not: I need to know how to find out if the json $.each
is running for the first time.
So say I have 14 items in the JSON the $.each
goes though 14 times I want to do something different to the first time the $.each
run.
For example, say the first return is the letter A, and in the array we have A,B,C,D,E,F.
I want to bold the A but none of the others.
The callback function for $.each
gets the index as its first parameter:
$.each(collection, function(index, value) {
// index will be zero on the first one
});