Markus
0
Q:

jquery each

var arr = ['one','two','three','four','five'];
$.each(arr, function(index, value){
	console.log('The value at arr[' + index + '] is: ' + value);
});
13
$( "li" ).each(function( index ) {
  console.log( index + ": " + $( this ).text() );
});
2
$( "li" ).each(function( index ) {
  console.log( index + ": " + $( this ).text() );
});
12
//Array
$.each( arr, function( index, value ){
    sum += value;
});

//Object
$.each( obj, function( key, value ) {
    sum += value;
});
16
$('.testimonial').each(function(){
    //if statement here 
    // use $(this) to reference the current div in the loop
    //you can try something like...
    if(condition){
    }
 });
8
$.each( obj, function( key, value ) {
  alert( key + ": " + value );
});
3

New to Communities?

Join the community