[Solved] HTML css jquery


There are many ways to target .item for example using :first-of-type

if this doesn’t work or it selects more than desired then you need to add more code.

$(".product-slider-inner>.item:first-of-type").addClass("active");
.item.active {
  color: red;
  font-size: 120%;
  font-style: italic;
}
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>


<div class="carousel-inner product-slider-inner">
  <?php while($featurepro = mysqli_fetch_assoc($featurequery)): ?>
  <div class="item">Something
    <div class="col-md-2 col-sm-6 col-xs-12 text-center">
      <a href="#"><img src="<?=$featurepro['image'];?>" class="img-responsive"></a>
      <h5 class="text-center">
        <?=$featurepro['title'];?>
      </h5>
      <h6 class="text-center">
        <?=money($featurepro['price']);?>
      </h6>
      <div class="btn btn--border btn--primary btn--animated"><a href="" class="anchor"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></a></div>
    </div>
  </div>
</div>

1

solved HTML css jquery