Question: I'm trying to make a vertical social share buttons for a blog post.
-------------------------------------------------------------------

I want the "share\_DIV" position to be fixed after scrolling to a
certain point.

* because the "Share\_DIV" is not supposed to appear on header area, its
position will be absolute and calculated by *jQuery* to let it be under
`*the header*` and `*the title*`, then when you scroll down and reach the text body "share\_DIV" should **start** walking with you while scrolling down to the end of the text body.

So the **share\_DIV** should move vertically on the scroll event, only between START POINT -> END POINT

*share\_DIV has class `.vertical-container` in fiddle code.*

[Fiddle Example](http://jsfiddle.net/markor91/h5t7pgfb/25/) will explain exactly what I need.

How can I get it done with jQuery?

Answer: 
You don't need to initialize it with a specific size - you can add objects later:

```
NSMutableArray *myArray = [NSMutableArray array];

for (int i = 0; i < 100; i++) {
    [myArray addObject:someData];
}

```

There are slight performance gains if you know the size ahead of time:

```
NSMutableArray *myArray = [NSMutableArray arrayWithCapacity:100];

```

But this is optional.
`NSNull` is the class used to represent an unset, invalid or non-existent object. Therefore you can pad the array to a specific size using instances of this class.

```
NSUInteger sizeOfArray = 10;
NSMutableArray *someArray = [NSMutableArray array];
for (NSUInteger i = 0; i < sizeOfArray; i++) {
    [someArray addObject:[NSNull null]];
}

```

Further, you can't use the syntax `someArray[i] = xyz;` if the value at position `i` doesn't exist, as it will cause an out of bounds error.