Closed avieru closed 10 years ago
You should use simply click_event
instead of click_event($data)
. Knockout will supply the current item as the first parameter when calling the handler. See Note 1 in the event binding's documentation.
Here is the working jsfiddle:
really appreciate it. so because i was passing $data, it was triggering the event while initially binding the items?
Not sure if it's an issue with knockout-jquery per say, I'm looking for some guidance.
I just want to hook into a click event when one of the button set buttons is clicked, instead the click is fired when the button set is created.
Any ideas?
Here is a working fiddle, look in console for output. http://jsfiddle.net/Yj8sG/2/
Thanks