The following code I used once in node.tpl.php template to construct a jquery gallery in Drupal 6 where I found somewhere.
<ul id="jgallery">
<?php foreach($field_myimage as $key => $image):?>
<li><?php print theme('imagecache', 'imagecache_name', $image['filepath']); ?></li>
<?php endforeach; ?>
</ul>
I wonder how it should be used in Drupal 7, the image style. And how to add in extra attributes like class. Thanks