Question: What does the meaning of wrap here?

```
// wrap this with jQuery
var $foo = $(foo);

```

Answer: 
`$(foo)` constructs a new jQuery object every time it is called. You can save the value of `$(foo)` into a variable to cache it:

```
var $foo = $(foo);

```

In JavaScript, `$` is also a valid character for a variable name, so you can prefix variables which contain jQuery objects with `$`.

Without seeing the rest of the code, it's hard to say much more.
Foo is being "wrapped" by JQuery, by attributing the return of the $() method to a variable, you'll be able to use the JQuery specific methods over the foo object. This is a way of "decorate" an object with additional behavior without modifying its prototype.