On Mar 3, 3:51 pm, owen <[EMAIL PROTECTED]> wrote:
> I wrote:
> > I'm using thecheckboxesplugin 
> > (http://www.texotela.co.uk/code/jquery/checkboxes/) and I'd like to pass 
> > the id of each checkbox that gets
> > checked to a function. I see that the plugin has an option to "return
> > the checked items:
>
> > > Return the checked items: $("#myform").checkCheckboxes(".top5", true);
>
> Do I need to construct it like this in order to access the returned
> object?
>
> checkall = $("#myform").checkCheckboxes("*", true);
>
> Don't I need to know the structure of the object in order to access
> information about it?
>
>   Owen

When you pass 'true' as the second parameter, you get a jQuery object
consisting of all the checkboxes. So, to get what you want:

var checked = [];
$("#myform").checkCheckboxes(".top5", true).each(
    function()
    {
        checked[checked.length] = this.id;
    }
);

checked is an array of id's.

--
Sam

Reply via email to