I have several links for sorting current elements on page.
Functions:
- A - click handler with array sort
- B - display elements according to sorted array.
Sorting can take even 2 seconds, so I want to display some feedback to user.
I thought about change link text to 'In progress..' or something like that.
In fun A store old link text and change it to 'In progress' and pass another function to B that I invoke after display elements to show old text of link, but it just doesn't work.
In debugger link text is changed, but I can see only old text all the time.
How can I create valid callback for this?
I see websites with similar sorting and without any feedback to user too.
Is this possible to do with javascript? Or feedback can be display only on ajax request?