Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8699839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:02:43+00:00 2026-06-13T02:02:43+00:00

My website cannot show the prices for different product options and I found the

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:02:44+00:00Added an answer on June 13, 2026 at 2:02 am

    You have problems with quotes. You may either escape \' the quotes around radio or simply change the code as follows:

    // -.---------------------------------.
        v                                 v
      $("ul li input[type='radio']:checked").attr('data-price'); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a website i'd like to show products in the following structure: [IMAGE] [PRODUCT
I'm using PowerShell for auto-deploying website, and recently found AppPool setting which cannot be
I cannot find any answers on the following issue. On my website I would
I use the following code on a website: // show tracks $('.content-playlist .track p').live('click',
Im using a jquery scroller for my photography website which i cannot get it
I have a client website where I recently started getting compilation errors: CS0029: Cannot
From the Microsoft website (see msdn.microsoft.com/en-us/library/ms683502(VS.85).aspx ) it clearly says Services cannot directly interact
I am getting the following warnings on the Event Log for a Asp.Net WebSite
I try to get text from website that I show in a textview. I
I downloaded Tomcat 6 from Tomcat Website and try to install. I found the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.