1

I have a list where each item has a "buy" button. The problem is that the click event for the button is passed to the list even if the button's handler returns false. How can I stop the list item from being selected when the button is clicked?

Thanks!

patrickkidd
  • 2,797
  • 2
  • 19
  • 19

1 Answers1

0

Try event.stopEvent(); in the button handler. This will call internally event.stopPropagation(); and event.preventDefault();

Martin
  • 852
  • 7
  • 20
  • And where does the event object come from? I don't see it in the 'handler' function arguments. – patrickkidd Jul 23 '14 at 20:04
  • Ah wait, it's not in the examples but it's the second argument passed to the 'handler' config object. Calling stopEvent() worked, thanks! – patrickkidd Jul 23 '14 at 21:39