my getJSON code doesn't work in jquery 1.4.2

Posted by Nikolius on Stack Overflow See other posts from Stack Overflow or by Nikolius
Published on 2010-03-23T17:04:26Z Indexed on 2010/03/23 17:23 UTC
Read the original article Hit count: 425

Filed under:
|

This is my first question on stackoverflow. I just wonder why my getJSON code doesn't work with jQuery 1.4.2, it worked smoothly with jQuery 1.3.2 though

So here is my code

$(document).ready(function(){
    $('td.hps_ajax a').click(function() {
        id = this.id.replace(/.*hps_ajax/,'');
        if(confirm('Anda yakin mau menghapus record ini?'))
            $.getJSON('../admin/media_admin/ajaxHapus/'+id, remove_row);
        return false;   
    }); 
})

function remove_row(data) {
    if(data.sukses == '1') {
        $('td.hps_ajax a#hps_ajax'+data.id).closest('tr').fadeOut('slow',function() {
            $(this).remove();
        });
    } else {
        alert('Gagal menghapus File.');
    }
}

The getJSON link is a CodeIgniter App Link. Anyone know why this doesn't work anymore?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about getjson