| 1 |
jQuery(document).ready(function($) { |
| 2 |
|
| 3 |
// ajax for post metabox |
| 4 |
jQuery('#post_lang_choice').change( function() { |
| 5 |
var data = { |
| 6 |
action: 'post_lang_choice', |
| 7 |
lang: jQuery(this).attr('value'), |
| 8 |
post_id: jQuery('#post_ID').attr('value') |
| 9 |
} |
| 10 |
|
| 11 |
jQuery.post(ajaxurl, data , function(response) { |
| 12 |
jQuery("#post-translations").html(response); |
| 13 |
}); |
| 14 |
}) |
| 15 |
|
| 16 |
// ajax for term edit |
| 17 |
jQuery('#term_lang_choice').change( function() { |
| 18 |
var data = { |
| 19 |
action: 'term_lang_choice', |
| 20 |
lang: jQuery(this).attr('value'), |
| 21 |
term_id: jQuery("input[name='tag_ID']").attr('value'), |
| 22 |
taxonomy: jQuery("input[name='taxonomy']").attr('value') |
| 23 |
} |
| 24 |
|
| 25 |
jQuery.post(ajaxurl, data, function(response) { |
| 26 |
jQuery("#term-translations").html(response); |
| 27 |
}); |
| 28 |
}) |
| 29 |
|
| 30 |
}); |
| 31 |
|