Next Button Issue

Next button won't disappear

by carter steinhoff

HTML

<div id="areaall">
  <div class="review">
<div style="margin-bottom:20px;" itemscope itemtype="http://schema.org/Review">
<div itemprop="itemReviewed" itemref="_name1" itemscope itemtype="http://schema.org/MedicalClinic"></div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"> <meta itemprop="worstRating" content="1"/><span itemprop="ratingValue">5</span>/<span itemprop="bestRating">5</span> stars </div>
<div><b>"<span itemprop="name">Travel Immunizations</span>"</b><br />
    <span itemprop="reviewBody">"We were taken on time, everything was explained thoroughly, a decision was made and the shots were given. An appt. for the next shots was made and we were out the door, ready for our busy day. We were treated in a courteous, professional manner and every question was answered to our satisfaction. It was a very positive experience."</span>
<div style="margin-top:15px;">
<div style="display:inline-block;" itemprop="author" itemscope itemtype="http://schema.org/Person">Submitted by: <span itemprop="name">Pat &#038; Frank</span></div>
</div>
</div>
</div>
</div>
<div class="review">
<div style="margin-bottom:20px;" itemscope itemtype="http://schema.org/Review">
<div itemprop="itemReviewed" itemref="_name1" itemscope itemtype="http://schema.org/MedicalClinic"></div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"> <meta itemprop="worstRating" content="1"/><span itemprop="ratingValue">5</span>/<span itemprop="bestRating">5</span> stars </div>
<div><b>"<span itemprop="name">My Experience</span>"</b><br />
    <span itemprop="reviewBody">"I had a really great experience at Passport Health in Barrie, ON. I was able to book my appointment and have my appointment in an extremely timely manner. The worker was thorough with her explanations, and gentle with the shots. I usually do not like needles all that much, but because of building a solid rapport in just the 15 minute consultation leading to the shots, I felt very...

JavaScript

var rvwList = $("#areaall .review").hide();
rvwList.slice(0, 2).show();
var size_li = rvwList.length;
var x = 2;
start = 0;

function showHide(){
if ( $('#areall span[itemprop="reviewBody"]').last().text().trim() == $('.review span[itemprop="reviewBody"]:visible').last().text().trim())
  {
    $('.next').hide();
  }
  else if ($('#areaall span[itemprop="reviewBody"]').first().text().trim() == $('.review:visible span[itemprop="reviewBody"]').first().text().trim()) {
    $('.prev').hide();
  }
}

$('.next').click(function() {
  $('.prev').show();
  
    rvwList.slice(start, start + x).hide();
    start += x;
    rvwList.slice(start, start + x).show();
    showHide();
    console.log('size_li is:' + size_li);
    console.log('start is:' + start);
    console.log('start is:' + end);  
});
$('.prev').click(function() {
    $('.next').show();
    rvwList.slice(start, start + x).hide();
    start -= x;
    rvwList.slice(start, start + x).show();
    showHide();
});