I'm using the following jQuery function:
$(document).ready(function(){$("#block-views-eriks-diary-block-1 .views-field-body").hide();$(".views-row-1 .readmore").toggle(function(){ $(this).addClass("expanded"); }, function () { $(this).removeClass("expanded");});$(".readmore").click(function(){ $("#block-views-eriks-diary-block-1 .views-row-1 .views-field-body").slideToggle("slow");});});
Is there any way to change this function so that .views-row-# can vary from 1 to 9 without having to add multiple versions of this snippet with .views-row-1, .views-row-2, etc.?I'm pretty new to jQuery so I'm not familiar with all the ins and outs yet... Any help would be appreciated!