each - Jquery toggle elements when button is clicked -


i want show album name , category element when corresponding button pressed song. how do this? jquery have @ moment. help.

$('.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" }) } 

what need here: next adjacent selector (“prev + next”) http://api.jquery.com/next-adjacent-selector/


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -