Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
jQuery custom code not working in shopify

I am trying to create anchor tag on <span> element. Here is my code:

$(function() {
  $("span.bold_option_value_title:contains('I Booked An Appointment')").click(function() {
    window.open('https://regentrepair.com/pages/book-your-repair', '_blank');
  })
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<span class="bold_option_value ">
  <label>
    <span class="bold_option_value_element">
      <input type="checkbox" class="cbm_1690320_664816" value="I Booked An Appointment " data-option_value_key="0">
    </span>
    <span class="bold_option_value_title">I Booked An Appointment </span>
  </label>
</span>

I am putting the code in theme.liquid file before the body closing tag but it is not working.

I tried this code in console without $(function()) this code is working but if i put it in theme.liquid it is not working. I also tried "Onload" but still no success.

Can you please tell me what I am doing wrong?

Thank you.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!