<!DOCTYPE html PUBLIC "- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>jQuery Data Demo With Iterative Click</title>
<script type="text/javascript" src="jquery-1.3.1.pack.js"></script>
<script type="text/javascript">
$(
function(){
var jButton = $( "button" );
$( "li" ).hide();
jButton.data(
"config",
{
Index: 0,
Collection: $( "li" )
}
);
jButton.click(
function( objEvent ){
var jThis = $( this );
var objConfig = jThis.data( "config" );
if (objConfig.Index < objConfig.Collection.length){
$( objConfig.Collection[ objConfig.Index++ ] ).slideDown();
}
objEvent.preventDefault();
return( false );
}
);
}
);
</script>
</head>
<body>
<h1>
jQuery Data Demo With Iterative Click
</h1>
<form>
<button>Show List Item</button>
</form>
<ul>
<li>
I am list item One.
</li>
<li>
I am list item Two.
</li>
<li>
I am list item Three.
</li>
</ul>
</body>
</html>