Re: [jQuery] Ajax response back question

2009-12-01 Thread brian
I'm not sure if you're trying to send back the image or just the src but, either way: $(function() { $('li').each(function() { var self = this; $.post('getImg.php', {id: $(self).attr('id')}, function($data) { // ${self} refers to the li el

[jQuery] Ajax response back question

2009-12-01 Thread David .Wu
$(function() { $('li').each(function() { var $id = $(this).attr('id'); $.post('getImg.php', {id: $id}, function($data) { // How to do it? }); }); }); I want to let each li use ajax load their own image an