@model Stattips.Models.MatchesList
<br />
<div class="col-sm-8 container-fluid">
<table class="table table-striped ">
<tr rowspan="3"><ul class="breadcrumb">
<li><a href="#">Soccer</a></li>
<li><a href="#">Albania</a></li>
<li class="active">Kategoria Superiore</li>
</ul></tr>
<tr>
<th>Matches</th>
<th>Country</th>
<th>Odds</th>
</tr>
@using (Html.BeginForm("AddMatches", "Matches"))
{
for (int i = 0; i < Model.Matches.Count(); i++)
{
<tr>
<td>
@Html.CheckBoxFor(m => Model.Matches[i].IsCheck)
@Model.Matches[i].HomeTeam-@Model.Matches[i].AwayTeam
@Html.HiddenFor(m => Model.Matches[i].HomeTeam)
@Html.HiddenFor(m => Model.Matches[i].AwayTeam)
</td>
<td>
@Model.Matches[i].Country
@Html.HiddenFor(m => Model.Matches[i].Country)
</td>
<td>
@Model.Matches[i].Odds
@Html.HiddenFor(m => Model.Matches[i].Odds)
</td>
</tr>
}
<tr>
<td>
<input type="Submit" value="Add" name="button1" id ="button1" class="btn btn-primary" />
</td>
</tr>
}
<tr>
<td>
<ul name="myselect" id="myselect"></ul>
</td>
</tr>
</table>
</div>
<script>
$('#button1').click(function(){
$('#myselect').empty();
$('checkbox.IsCheck').each(function () {
var _row_data = $(this).parent().siblings().map(function(){
return $(this).html();
}).get().join('');
$('#myselect').append('<li>' + _row_data + '</li>');
});
});
</script>
Stat_1 -1 Newbie Poster
rproffitt 2,662 "Nothing to see here." Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.