Question: I integrated facebook api in my application. I am storing all wall values in array and showing it in my tableview NIB file. But after logged in I am getting an EXC\_BAD\_ACCESS exception in main.m in line this.

int retVal = UIApplicationMain(argc, argv, nil, nil);

I am able to trace value. Here is my code of loading nib file.

```
facebookData=[[[[NSArray alloc]initWithArray:result]retain]autorelease];
Fave *bController = [[[Fave alloc] initWithNibName:@"Fave" bundle:nil]autorelease];
[self.navigationController pushViewController:bController animated:YES];
[bController release];

```

Here facebookdata is an array defined in main.m file. I am storing values of wall in this array and in next Fave nib file I am showing values from array. Why I am getting this error during loading of nib file.

Thanks in advance

Answer: 
Perhaps something like:

```
var unchecked = [];
var checked = [];
jQuery.each($('input[type="checkbox"]'), function() {
    if (this.checked) {
        checked.push(this);
    }
    else {
        unchecked.push(this);
    }
});

```
I'm not sure to understand what you want to accomplish. From your comments it seems to me that you need something like this (replace your `div.wrapper` with mine and add the **jQuery** code before the end of your `body`):

**HTML code (`div.wrapper`) :**

```
<div class="wrapper">
<form action="#" method="get" accept-charset="utf-8">
    <ul class="checkboxes">
        <li><label for="chk_1">chk_1</label>
            <input type="checkbox" name="chk1" value="" id="chk_1">
        </li>
        <li><label for="chk_2">chk_2</label>
            <input type="checkbox" name="chk2" value="" id="chk_2">
        </li>
        <li><label for="chk_3">chk_3</label>
            <input type="checkbox" name="chk3" value="" id="chk_3">
        </li>
        <li><label for="chk_4">chk_4</label>
            <input type="checkbox" name="chk4" value="" id="chk_4">
        </li>
        <li><label for="chk_5">chk_5</label>
            <input type="checkbox" name="chk5" value="" id="chk_5">
        </li>
        <li><label for="chk_6">chk_6</label>
            <input type="checkbox" name="chk6" value="" id="chk_6">
        </li>
    </ul>

    <input type="button" value="merge" id="mer" />
</form>

```

**jQuery code:**

```
<script type="text/javascript" charset="utf-8">
$('document').ready( function() {
    $('#mer').click( function() {
        var checked = $(':checkbox:checked').parents("li").remove();
        checked.insertBefore($(".checkboxes li:first"));
    });
});
</script>

```