Wait until user click a span then trigger AJAX request
问题 Currently I'm working with simple AJAX put request when user change something in input field and click on "check" icon. The code below doesn't change icon from "edit" to "check", BUT when I delete a line $.when($(icon).trigger("click")).then(function(){ with AJAX request then the icon will change. I really appreciated any help with the appropriate jquery instruction $(document).ready(function() { $('.clickable-edit-icon').click(function(e){ e.preventDefault(); var delete_id = $(this).closest(