我想在为该歌曲按下相应按钮时显示专辑名称和类别元素。我该怎么做呢?这是我目前的jquery。谢谢你的帮助。
$('.song-list-btn').each(function(i, obj) {
$(this).on('click', function () {
});
});
foreach (var item in Model)
{
<button class="song-list-btn" type="button">
<span class="fa fa-bars" aria-label="Song Details Menu"></span>
</button>
@Html.EditorFor(model => item.AlbumName, new { htmlAttributes = new { @class = "form-control details", @placeholder = "Album Name" } })
@Html.ValidationMessageFor(model => item.AlbumName, "", new { @class = "text-danger" })
@Html.EditorFor(model => item.Category, new { htmlAttributes = new { @class = "form-control details", @placeholder = "Category Name" } })
@Html.ValidationMessageFor(model => item.Category, "", new { @class = "text-danger" })
}