Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $(".addCart").click(function(){
- $.post(".addCart.val()",function(data){
- $("#test").html(data).show();
- });
- });
- });
- <div id="test" style="background-color: grey"></div>
- <?php while ($row = mysqli_fetch_array($products)):?>
- <div class="span3">
- <div class="product">
- <div class="product-img">
- <div class="picture">
- <img src="images/<?php echo $row['image'] ?>" alt="" width="540" height="374" />
- <div class="img-overlay">
- <a href="#" class="btn more btn-primary">توضیحات بیشتر</a>
- <button value="<?php echo $row['id']?>" class="btn buy btn-danger addCart">اضافه به سبد خرید</button>
- </div>
- </div>
- </div>
- <div class="main-titles no-margin">
- <h4 class="title"><?php echo $row['price'] ?></h4>
- <!--<h5 class="no-margin">محصول ویژه 434</h5>-->
- </div>
- <p class="desc"><?php echo $row['name']?></p>
- <p class="center-align stars">
- <span class="icon-star stars-clr"></span>
- <span class="icon-star stars-clr"></span>
- <span class="icon-star"></span>
- <span class="icon-star"></span>
- <span class="icon-star"></span>
- </p>
- </div>
- </div> <!-- /product -->
- <?php endwhile;?>
- $(".addCart").click(function(event){
- var id = event.target.val();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement