Mark, do the buttons have a shared identifier like a class and a unique attribute that identifies each button?
If so, then something like this:
for the jQuery identifier: {code:javascript} .cart-shared-class {code}
and then for a variable called "foo", use 'JS Code' in the "To" selector and a jQuery statement along these lines:
{code:javascript} jQuery('this').attr("unique_attribute_for_this_button") {code}
Because the identifier is a shared class across the objects, the jQuery onHandler will fire every time that object is clicked and then assuming that "unique_attribute_for_this_button" is actually unique per button and is mapped to "foo" and "foo" is mapped correctly in your tags then whenever the jQuery onHandler runs a unique value is sent to foo and on to your tags.