[Tin tức] Bài 93 : Lập trình Website PHP mô hình MVC – Đánh giá sao



Website :
Series tạo website Laravel :
Series tạo website MVC PHP OOP mysqli :
Series web bán hàng điện máy PHP – HTML – CSS :
Web điện máy :
Download video thiết kế web php mysql A-Z :
~~~~~~~~~~~~~~~~~~
FANPAGE :
FACEBOOK :

1 bình luận về “[Tin tức] Bài 93 : Lập trình Website PHP mô hình MVC – Đánh giá sao”

  1. <script>

    function remove_background(product_id)

    {

    for(var count = 1; count <= 5; count++)

    {

    $('#'+product_id+'-'+count).css('color', '#ccc');

    }

    }

    //hover chuột đánh giá sao

    $(document).on('mouseenter', '.rating', function(){

    var index = $(this).data("index"); //3

    var product_id = $(this).data('product_id'); //13

    // alert(index);

    // alert(product_id);

    remove_background(product_id);

    for(var count = 1; count<=index; count++)

    {

    $('#'+product_id+'-'+count).css('color', '#ffcc00');

    }

    });

    //nhả chuột ko đánh giá

    $(document).on('mouseleave', '.rating', function(){

    var index = $(this).data("index");

    var product_id = $(this).data('product_id');

    var rating = $(this).data("rating");

    remove_background(product_id);

    //alert(rating);

    for(var count = 1; count<=rating; count++)

    {

    $('#'+product_id+'-'+count).css('color', '#ffcc00');

    }

    });

    </script>

    <script>

    $('.rating').click(function(){

    var index = $(this).data("index"); //3

    var product_id = $(this).data('product_id');

    var customer_id = $(this).data('customer_id');

    $.ajax(

    { url: 'ajax/rating.php',

    data: {index:index, product_id:product_id, customer_id:customer_id},

    type: 'POST',

    success: function(data) {

    alert('Đánh giá '+index+' sao thành công');

    }

    });

    })

    $(document).on('mouseenter', '.rating_login', function(){

    alert('Làm ơn đăng nhập để đánh giá sao.');

    })

    </script>

    Bình luận

Viết một bình luận

bahis10bets.com betvole1.com casinomaxi-giris.com interbahis-giris1.com klasbahis1.com mobilbahisguncelgiris1.com piabetgiris1.com tipobettgiris.com tumbetgiris1.com betboro 1xbet giriş
bahis10bets.com betvole1.com casinomaxi-giris.com interbahis-giris1.com klasbahis1.com mobilbahisguncelgiris1.com piabetgiris1.com tipobettgiris.com tumbetgiris1.com betboro 1xbet giriş
antalya bayan escort
antalya bayan escort
antalya bayan escort