Commit 7c696e88 authored by Tino Goratsch's avatar Tino Goratsch

minor code optimization

parent aa56cc53
......@@ -6,12 +6,10 @@
jQuery(document).ready(function ($) {
$('#rating-wrapper')
.on('change', ':radio', function () {
$('.rating__average').remove();
$('.rating__already-rated').remove();
$(this).closest('form').submit();
})
.on('click', '.rating_mobile .rating__star', function () {
$('.rating__average').remove();
})
.on('click', '.rating__average .rating__star', function () {
// .rating__average sets the direction back to ltr, so we have to account for this
var index = 4 - $(this).index();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment