title: call JS function inside razor foreach statement
body: <p>I have a <code>Model</code> with <code>LevelInfo</code> property:</p>
  
  <pre><code>public IEnumerable&lt;Tuple&lt;string, string, string&gt;&gt; LevelInfo { get; set; }
  </code></pre>
  
  <p>In the view I have a JS function:</p>
  
  <pre><code>function fillPath(level, color) {
          $('[level=' + level).attr({ 'fill': color });
      }
  </code></pre>
  
  <p>Now I want to iterate through <code>LevelInfo</code>  and call <code>fillPath</code> function:</p>
  
  <pre><code>$(document).ready(function() {
  
          @foreach (var info in Model.LevelInfo)
          {
              // How can I call JS function from here?
              // i.e,  fillPath(info.Item1, info.Item2)
          }
      });
  </code></pre>
  
  <p>Thanks.</p>