Question: ...what does it mean? I have almost no experience with jQuery, and need to work with some existing code.

All the tutorials talk about is using $() with pseudo-CSS selectors, but what would be the meaning of something like this:

```
$(function makeFooWriteTooltip() {
    if($("div[name='txttooltip']").length>0){
        $("div[name='txttooltip']").each(
         function(){

```

Answer: 
It's a shortcut for:

```
$(document).ready(function makeFooWriteTooltip() {

```

Though, the function need not have a name here. Passing a calback to [`$()`](http://api.jquery.com/jQuery/#jQuery3) runs the function on the `document.ready` event, just a bit shorter, these are equivalent:

```
$(document).ready(function() { 
  //code
});
$(function() { 
  //code
});

```

Also, given your exact example, there's no need to check the [`.length`](http://api.jquery.com/length/), if it's there it runs, if not the [`.each()`](http://api.jquery.com/each/) doesn't do anything (no error), so this would suffice:

```
$(function () {
  $("div[name='txttooltip']").each(function(){

```
[jQuery API tells us](http://api.jquery.com/jQuery/#jQuery3):

jQuery( callback ) ( which equals to $(callback) )

* callback - The function to execute when the DOM is ready.