This commit is contained in:
2025-03-21 20:24:43 +01:00
parent 224398df90
commit f34c9162d4
12427 changed files with 5329941 additions and 373384 deletions

View File

@@ -67,7 +67,7 @@ jQuery.fn.rating = function(generalOptions) {
ratingInput = $('<input type="number" name="'+componentOptions.input+'" id="'+componentOptions.input+'" />');
ratingInput.val(ratingValue);
ratingInput.css('display', 'none');
ratingInput.change(displayInteractiveGrade);
ratingInput.on('change', displayInteractiveGrade);
$ratingComponent.append(ratingInput);
initInteractiveGrade();
} else {
@@ -81,7 +81,7 @@ jQuery.fn.rating = function(generalOptions) {
for (var i = minValue; i <= maxValue; ++i) {
newStar = emptyStar.clone();
newStar.data('grade', i);
newStar.hover(function overStar() {
newStar.on('mouseenter mouseleave', function overStar() {
var overIndex = $('.star', fullStars).index($(this));
$('.star', fullStars).each(function overStars() {
$(this).removeClass('star-on');
@@ -93,14 +93,14 @@ jQuery.fn.rating = function(generalOptions) {
}
});
});
newStar.click(function selectGrade() {
newStar.on('click', function selectGrade() {
var selectedGrade = $(this).data('grade');
ratingInput.val(selectedGrade);
});
fullStars.append(newStar);
}
fullStars.hover(function(){}, displayInteractiveGrade);
fullStars.on('mouseenter', function(){}).on('mouseleave', displayInteractiveGrade);
displayInteractiveGrade();
}