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

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

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