Here is code fragment:
@foreach (var item in Model)
{
<table>
<thead>
<tr>
<th>Column1</th>
<th>Column2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Value1</td>
<td>Value2</td>
</tr>
</tbody>
<table>
<script type="text/javascript">
$(function () { $("table").highchartTable(); });
</script>
}
Why javascript code is not created inside MVC3 Razor foreach loop ? There must be multiple javasctipt codes created.
However, the resulting HTML doesnt have javascript at all.
Any ideas ??
Thank you.