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 9251923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:49:12+00:00 2026-06-18T10:49:12+00:00

I have some Jquery that I’ve added to a load of other Jquery (which

  • 0

I have some Jquery that I’ve added to a load of other Jquery (which all works fine) but it’s breaking the rest of my code. There’s an error in there somewhere but I just can’t work out where!

//Retrieve the customization summary area:
var summary = $('#customise-area-3 p');

//Use jQuery to select all the checkboxes with the name hardware that are checked.
$('input[type=checkbox][name=hardware\[\]]:checked').each(function(k,v) {
    //Retrieve the value of the checkbox.
    var checkboxValue = v.val();

    //Add the checkbox value to the summary area:
    summary.innerHTML += checkboxValue + '<br />';
});

This is within WordPress so all the rest of my Jquery is in the style of:

jQuery(document).ready(function( $ ) 
{
    $("#customise").click(function()
    {
        $(".entire_product").hide();
        $(".customise").show();
    });
});

To get the code working within the WordPress environment I’ve done the following:

jQuery(document).ready(function( $ ) 
{
   var summary = $('#customise-area-3 p').get(0);

   $('input[type=checkbox][name="hardware[]"]:checked').each(function(k,v) {
    //Retrieve the value of the checkbox.
    var checkboxValue = v.val();

    //Add the checkbox value to the summary area:
    summary[0].innerHTML += checkboxValue + '<br />';
});
});

Although this stops the rest of my code from breaking, it doesn’t actually do anything. I.e add the selected checkbox value to the summary.

  • 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-18T10:49:13+00:00Added an answer on June 18, 2026 at 10:49 am

    You are incorrectly using \ slash in selector and you are using innerHTML on jQuery object which is wron

    Change

    $('input[type=checkbox][name=hardware\[\]]:checked')
    

    To

    $('input[type=checkbox][name="hardware[]"]:checked')
    

    You better use wild card if you need to check name that starts with hardware

    $('input[type=checkbox][name^=hardware]:checked')
    

    Change

    summary.innerHTML += checkboxValue + '<br />';
    

    To

    summary[0].innerHTML += checkboxValue + '<br />';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some jQuery code that runs fine until I add the jQuery UI
I have a script on jquery that load some site in iframe using: $(#demo_frame).attr('src',
hi guys sorry to ask this one again but i have some jquery that
I have some JQuery code that converts all HTML elements of a specific class
I have some jquery that smoothly resizes a text input on click. It all
I have some jQuery code that highlights which radio button is checked by turning
I have some jquery code that is doing an ajax lookup and returning comma
I have some jQuery code that highlights a link when clicked, and changes the
I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() {
I have some jQuery code that is having difficulty running because I'm using it

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.