1 2 3 4 5 6 7 8 9 10 11
function preview_admin(field, preview_url) { $.ajax({ type: 'GET', url: preview_url, data: { data: $('#id_' + field).val() }, success: function (data, textStatus, jhr) { $('#preview-' + field).html(data).show('fast'); } }); }