title: Knockout.js - passing parameters
body: <p>I have a problem with Knockout.js. I want to pass username to a function and display it on alert. Something strange is happening. I get alerts each time when i refresh page with correct usernames, but after i click it i don't get any response. What is wrong here? Here is my code:</p>
  
  <pre><code>&lt;ul data-bind="foreach: contacts"&gt;
     &lt;li class="user-box"&gt;&lt;span class="user-box-name" data-bind="text: username, click: $root.userClick(username)"&gt;&lt;/span&gt;
     &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>self.userClick = function (x) {
      alert(x);
  }
  </code></pre>