Can someone tell me why the $(this).html(data); doesn't work inside $.get ? instead of this, how can I modify the html inside $.get, because the alert(data); shows the data correctly.
- $(document).ready(function () {
- $('.item').each(function () {
- $.get('item.php' , { item_id: $(this).html() } , function(data){
- $(this).html(data);
- alert(data);
- });
- });
- });