I have this error, but I don't know why, the code seems correct...
templatesase.html.twig
<head>
<meta charset="UTF-8">
<title>
{% block title %}Welcome!
{% endblock %}
</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="{{ asset('css/star-rating.css') }}" media="all" rel="stylesheet" type="text/css"/> {% block stylesheets %}{% endblock %}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="{{ asset('js/star-rating.js') }}" type="text/javascript"></script>
</head>
templatesproductindex.html.twig
<script>
jQuery(document).ready(function () {
var $inp = $('#rating-input');
$inp.rating({
min: 0,
max: 5,
step: 1,
size: 'lg',
showClear: false
});
$('#btn-rating-input').on('click', function () {
$inp.rating('refresh', {
showClear: true,
disabled: ! $inp.attr('disabled')
});
});
$inp.on('rating.change', function () {
alert($('#rating-input').val());
});
});
</script>
Do you have any idea ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…