0

I'm trying to provide a number of clicked link to click handler. For some reason it provides the whole knockout model, instead of the $index. Here's jsfiddle: http://jsfiddle.net/yaroslavya/hfWs8/13/

Yaroslav Yakovlev
  • 6,303
  • 6
  • 39
  • 59

1 Answers1

2

The first argument to .bind determines what this will be in the handler. So, you can either pass $index as the second argument or operate on this in your handler with your current code.

Sample: http://jsfiddle.net/rniemeyer/Ff9rh/

RP Niemeyer
  • 114,592
  • 18
  • 291
  • 211