Showing a log when deleting folders and content

Showing a log when deleting folders and content

I'm working on my administration panels mailbox implementing a delete feature for the mailbox folders, however as I am not familiar with PHP, this is just somewhat of a simulation. Currently I simply delete the list item which was clicked of which the class '. clicked' is applied to

  1. $(clicked).remove();
However I'd like to show a log such as the following;

  • Moving <NUM*> e-mails from <SUB-FOLDER**> into trash folder
  • Moving <NUM*> e-mails from <SUB-FOLDER**> into trash folder
  • Deleting folders...
*For the simulation, this is a random number from 500-2500 of which will go up every 100.
** Goes through all sub-folders

Where I've got to so far is;

  1. $.confirm.deleteLog({
  2. 'clicked' : clicked.find('a').text()
  3. });

And in the function;

  1. $.confirm.deleteLog = function(params){
  2. setTimeout( function()  { $('#confirmBox p .log').append(params.clicked + '<br />'); }, 1000);
  3. setTimeout( function()  { $('#confirmBox p .log').append(params.clicked + '<br />'); }, 2000);
  4. setTimeout( function()  { $('#confirmBox p .log').append(params.clicked + '<br />'); }, 3000);
  5. setTimeout( function()  { $('#confirmBox p .log').append(params.clicked); }, 4000);
  6. };
Which produces the following;

Sub-Folder 3T-1 I-2 - I1 T-1 I-2 - I2 
Sub-Folder 3T-1 I-2 - I1 T-1 I-2 - I2 
Sub-Folder 3T-1 I-2 - I1 T-1 I-2 - I2 
Sub-Folder 3T-1 I-2 - I1 T-1 I-2 - I2