Select All Checkboxes On Click using Jquery
<p>I have following HTML:</p>

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

<p>and Following Jquery:</p>

<pre><code>$(document).ready(function (){

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

     });
 });
</code></pre>

<p>But i am getting Syntax error:</p>

<pre><code>Error: Syntax error, unrecognized expression: [name=Cevent[]]
</code></pre>

<p>I think i am writing wrong Selector at <code>input[name=Cevent[]]</code> 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[].</p>
