<!DOCTYPE html PUBLIC "- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Looping Over Arrays With jQuery</title>
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$( InitPage );
function InitPage(){
var jList = $( "#list" );
var arrValues = [ "one", "two", "three" ];
$.each(
arrValues,
function( intIndex, objValue ){
jList.append(
$( "<li>" + objValue + "</li>" )
);
}
);
}
</script>
</head>
<body>
<h1>
Looping Over Arrays With jQuery
</h1>
<p>
Array Items:
</p>
<ol id="list">
</ol>
</body>
</html>