In my app, I render a bunch of @trailers:
index.html.erb:
<div class="trailers infinite">
<%= render @trailers %>
</div>
_trailer.html.erb:
<div class="col-sm-6 col-lg-4 trailer">
</div>
When a trailer is clicked, I want to append an alert to the trailer:
$('.trailer').click(function(){
$(this).closest('.trailer').append($('.first-notification-message').slideDown())
});
Except my current method is messing up the formatting because it's pushing down only one @trailer column. I'd prefer to push down everything equally. But not sure how to do this because there are different number of columns for different screen widths.
Any ideas?