jquery split() issue
<p>Hopefully this is easy for someone.</p>

<p>I have a set of checkboxes with values 1,2,3 etc with the same name attribute (cp_bundle).</p>

<p>I use the following code to get a comma-delimited list of those checkboxes.</p>

<pre><code>var hl_calling_plan_bundle = $('input[name="cp_bundle"]:checked').getCheckboxVal() || "";

jQuery.fn.getCheckboxVal = function(){
    var vals = [];
    var i = 0;
    this.each(function(){
        vals[i++] = jQuery(this).val();
    });
    return vals;
}
</code></pre>

<p>if I check the first and third checkboxes, the following will be returned:</p>

<pre><code>1,3
</code></pre>

<p>Then, I want to run a test to see whether a particular value (e.g. "3") exists in the the returned variable</p>

<p>But, I can't get past the split of the variable using the following:</p>

<pre><code>var aCallingBundle = hl_calling_plan_bundle.split(",");
</code></pre>

<p>This gives the error: </p>

<pre><code>hl_calling_plan_bundle.split is not a function
</code></pre>

<p>Any idea what's going on? </p>
