use $.ajax() instead of $.get / $.post