Hi,
I have the following:
<ul id='foo'>
<li>
<ul class='a'>
<li class='animal'>goat</li>
<li class='animal'>horse</li>
<li class='animal'>pig</li>
</ul>
</li>
<li>
<ul class='a'>
<li class='animal'>zebra</li>
</ul>
</li>
</ul>
I want to make a delegate handler for the inner li items (the ones with class 'animal'):
$('#foo li ul').delegate('li', 'click', function(event) {
...
});
I'm not sure how to define the selector though in the delegate definition - what's the right way to do it?
Thanks