Question: So, lets say that we have this structure:

```
  <div id='allTempLinkHolder'>
    <div class='tempLink'>Value</div>
    <div class='tempLink'>Value 2</div>
    <div class='tempLink'>Value 3</div>
 </div>

```

How i can submit all of the different values of .tempLink with post ajax, for example to post them to fetch.php ?
Thanks!

Answer: 
Try this:

<http://jsfiddle.net/htKRf/3/>

```
var links = []

// Put all the tempLinks into an array. 
$.each($('.tempLink'), function (index, element) {
    links.push($(element).text());    
});

// Post it to the url.
$.post('fetch.php', JSON.stringify(links), function() { console.log("SUCCESS"); });

```

​
Either a separate Ajax call for each div

```
 $("div.tempLink").each(function(index, elem) {
    $.ajax({
        url: "my url" + "?param=" + this.text(),
        success: function() {...
        }
    });
});​

```

or a single call with array of values

```
var values = new Array();
$("div.tempLink").each(function(index, elem) {
    values.push(this.text());
});

$.ajax({
    type: "POST",
    url: "my url",
    data: JSON.stringify(values),
    contentType: "application/json; charset=utf-8",
    success: function() {...
    }
});​

```

​