Skip to content Skip to sidebar Skip to footer

Jrate How To Get Value From Selected Star And Store It In Database Using Jquery Or Javascript

I am trying to get value from Jrate Plugin for example when the using click on 3rd start the value should i get should must be 3.and i can get it on using jRate onSet option Here i

Solution 1:

One way is to set a custom attribute. You can do this on the #jRate element

$("#jRate").jRate({
        onSet: function(rating) {
                   $("#jRate").attr("data-rating", rating);
             }
    });

then, later in the click handler

$("button").click(function(){
    var rating = $("#jRate").attr("data-rating");
});

Post a Comment for "Jrate How To Get Value From Selected Star And Store It In Database Using Jquery Or Javascript"