title: iDangerous Swiper 2 : Changing CSS/Style of Arrows on First & Last Slide?
body: <p>I'm <em>strictly</em> working with an older version of <strong>Swiper (v2.7.6)</strong> and also <strong>jQuery (v1.10.1)</strong></p>
  
  <p>I'm trying to change the opacity of the left and right arrows when the first or last slide is active. (Left-arrow will be lower opacity if on 1st slide, and same with the right-arrow if on last slide.</p>
  
  <p>Arrows will return to full opacity if in-between slides.<br/>Unfortunately after many hours I couldn't resolve this.</p>
  
  <p>Here is my current jQuery code:</p>
  
  <pre><code>if ($(".swiper-slide:eq(0)").hasClass("swiper-slide-active")) {
    $(".arrow-left").css("opacity","0.2");
  }
  else {
    $(".arrow-left").css("opacity","1");
  }
  </code></pre>
  
  <p>HTML is:</p>
  
  <pre><code>&lt;div class="swiper-container"&gt;
    &lt;a class="arrow-left" href="#"&gt;&lt;/a&gt; 
    &lt;a class="arrow-right" href="#"&gt;&lt;/a&gt;
  
    &lt;div class="swiper-wrapper"&gt;
      &lt;div class="swiper-slide"&gt;&lt;/div&gt;
      &lt;div class="swiper-slide"&gt;&lt;/div&gt;
      &lt;div class="swiper-slide"&gt;&lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>API doc for Swiper 2 can be found <a href="https://github.com/nolimits4web/Swiper/blob/Swiper2/API.md" rel="nofollow noreferrer">here</a>.</p>
  
  <p>Thank you.</p>