code: function (element, event) {
                  var pageX = (event.changedTouches) ? event.changedTouches[0].pageX : event.pageX;
  
                  var offsetx = pageX - $(element).offset().left;
                  if (!ltr) { offsetx = range.width() - offsetx };
                  if (offsetx > range.width()) { offsetx = range.width(); }
                  if (offsetx < 0) { offsetx = 0; }
  
                  return score = Math.ceil(offsetx / itemdata('starwidth') * (1 / itemdata('step')));
              }
docs: this function calculates the score based on the current position of the mouse.