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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:28:20+00:00 2026-06-09T10:28:20+00:00

I have following HTML: <label><input type=checkbox value=12 name=Cevent[] /> Yoga</label> <label><input type=checkbox value=12 name=Cevent[]

  • 0

I have following HTML:

<label><input type="checkbox" value="12" name="Cevent[]" /> Yoga</label>
<label><input type="checkbox" value="12" name="Cevent[]" /> Yoga 1</label>
<label><input type="checkbox" value="12" name="Cevent[]" /> Yoga 2</label>
<label><input type="checkbox" value="12" name="Cevent[]" /> Yoga 3</label>
<label><input type="checkbox" id="selectAllEventList" name="selectAllE"> Select All</label>

and Following Jquery:

$(document).ready(function (){

   $('#selectAllEventList').click (function () {
          $('input[name=Cevent[]]').each(function(){
          $(this).prop('checked', status);
          });

     });
 });

But i am getting Syntax error:

Error: Syntax error, unrecognized expression: [name=Cevent[]]

I think i am writing wrong Selector at input[name=Cevent[]] what is the problem how can i write it correctly because i must have to send it as a array so i have to write it as Cevent[].

  • 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-09T10:28:21+00:00Added an answer on June 9, 2026 at 10:28 am

    You can use \ to escape [,

    Live Demo

    $(document).ready(function (){
    
       $('#selectAllEventList').click (function () {
              $('input[name*=Cevent\\[]').each(function(){
                  if( $('#selectAllEventList').is(':checked'))
                       $(this).prop('checked',true);
                  else
                       $(this).prop('checked',false);
              });
    
         });
     });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following bit of HTML: <label>First Name</label><input name=Question62 type=text value= /> Unfortunately
I have following html: <label for=live>Live</label> <input type=checkbox name=live id=live /> How to save
I have the following HTML : <label> <input type='checkbox' checked=checked /> CLICK ME.... </label>
Given the following HTML structure: <input class=addon-thumb type=checkbox name=foo/><label for=foo><img class=addon-thumb src= title=bar alt=foo/></label>
I have the following HTML: <input id=1 type=checkbox/> <label for=1>bla bla</label> <br/> <input id=2
i have the following jquery code: $(document).ready(function() { $('.restrictiveOptions input[type!=checkbox], .restrictiveOptions select').change(function() { //
I have the following code in my html: <li> <p> <input type=checkbox id=is_selected/> <img
So I have the following html: <div id=divForComponents> <input type=button value=+ onclick=addFilter('divForComponents')/> </div> And
I have the following html: <label class=description>Label Text</label><input type=password /> And the css styles
I have the following HTML form <form action=# method=post> <table> <tr> <td><label>Product:<label> <input type=text

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.