| 1 |
jQuery(document).ready(function($) { |
| 2 |
|
| 3 |
$('#isc_add_metafields').click(function(){ |
| 4 |
$('#isc_loading_img').show(); |
| 5 |
var data = { |
| 6 |
action: 'add_meta_fields', |
| 7 |
whatever: 1234 |
| 8 |
}; |
| 9 |
|
| 10 |
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php |
| 11 |
$.post(ajaxurl, data, function(response) { |
| 12 |
$('#add_metafields_result').html( response ); |
| 13 |
$('#isc_loading_img').hide(); |
| 14 |
}); |
| 15 |
}); |
| 16 |
|
| 17 |
}); |