Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if .each first element

$('.selector').each(function(key, value){
    if ( key === 0) {
       // do something if first element
    }
});
 
PREVIOUS NEXT
Tagged: #check #element
ADD COMMENT
Topic
Name
5+9 =