My website cannot show the prices for different product options and I found the following error message on Chrome inspection:
Uncaught SyntaxError: Unexpected identifier
It is pointing to the line below:
var first_variant_price = $('ul li input[type='radio']:checked').attr('data-price');
This is the complete script:
<script type='text/javascript' charset='utf-8'>
$(document).ready(function(){
var first_variant_price = $('ul li input[type='radio']:checked').attr('data-price');
$('.current-price').text( first_variant_price );
$('input[type='radio']').click(function() {
var variant_price = $(this).attr('data-price');
$('.current-price').text( variant_price);
});
});
</script>
I could not realize any mismatch on this code. Thanks for the help!