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: 
if you simmply want an array sent:

```
var values = $.map($('.tempLink'), function(el, idx) {
    return $(el).text()
})

$.post('fetch.php', { values: values}, function(data) {
        /* do something with return data*/
})

```
First you would use a jQuery class selector to collect the values into a suitable data structure. I wasn't sure how you wanted to do that, so I used a javascript map and linked the position in the original list to the value of the text `{"link1":"value1","link2":"value2",...}`.

```
var map={};
$(".tempLink").each(function(index) {
    map["tempLink"+index] = $(this).text();
});

```

To figure out the usage and syntax of $.ajax see [the jquery ajax api ref.](http://api.jquery.com/jQuery.ajax/)

```
$.ajax({
    type: "POST",
    url: "fetch.php",
    data: JSON.stringify(map),
    dataType: "...", //The type of data you're expecting the server to respond with
    contentType: "application/json; charset=utf-8",
    success: function(data, status, jqXHR) {},
    error: function(jqXHR, status, error) {}
});​

```

When your ajax call returns, if it's successful the success callback fires, otherwise error fires. You can use these to handle the data your server responds with, or let the user no that the request failed.