Reading this value

Reading this value

I have a div called 'item' that is output dynamically by jQuery.

There may be any number of 'item' divs.

Each 'item' has a checkbox and a span that has in it the itemID of the item itself.

This image will explain it all.




In the example above, the div 'searchresults' can have any number of div/item in it.

What I'd like do to is have a 'click' function on the checkbox that reads the itemID from the span at the bottom.

The click event bit is easy.

  1. $('.chkReorder').live('click', setReorderFlag);
But once I get into setReorderFlag how do I read that itemid value from the span underneath the checkbox?