Monday, February 13, 2012

Ask Ben: Iterating Over An Array With jQuery

Ask Ben: Iterating Over An Array With jQuery: "// Loop over each value in the array.
$.each(
arrValues,
function( intIndex, objValue ){
 
// Create a new LI HTML element out of the
// current value (in the iteration) and then
// add this value to the list.
jList.append(
$( "
  • " + objValue + "
  • " )
    );
    }
    );"

    'via Blog this'