blueimp/jQuery-Image-Gallery — Issue #6: get values depending clicked img
Author: tsilik
Created: 2011-11-27 22:40:45+00:00
State: open

Quick question.. I need to pass some values as an ajax call from an image.

sample item

```javascript

```

I use the following

```javascript
$('#gallery').imagegallery ( {
show: 'fade',
hide: 'fade',
canvas: true,
modal: false,
buttons: {
Select: function() {
$.ajax({
type : 'POST',
url : '../order.php',
data: {
photo_id : $(this).siblings("#img_id").val() ???
},
success : function(data) {
(change specific #image_box css)
}
});
}
}
});
```

I tried to work around it with

```javascript
var it;
$("a[rel=gallery]").live("click", function(event) {
it = $(this); // and finding the #img_id from object `it`
});
```

but I am sure the solution is much simpler...