Jquery ajax – I have a loop and want to add the class to the last 4 elements with ajax
I am wanting to select the last 4 elements using nth-child. Is there a way of doing this? function(data){ var output; var html = ""; $.each(data.items, function(i, item){ videoTitle = item.snippet.title; videoId = item.snippet.resourceId.videoId; console.log(i); html += "<div id="video" class="col-xs-12…