title: Using a callback with $(location).attr()
body: <p>I am trying to trigger an event when a $(location).attr() is done. I have found many solutions to do this when the attr() is used to change a img src for example but not with $(location).attr().</p>
  
  <p>You may ask why I want to do this?
  In my application, I have a button to export data to an xml (using a php code in the background). But, this can take some time (several seconds!). So, I would like to display a tiny "Wait please during exportation" and then remove it once the xlsx is generated and the download started.</p>
  
  <p>It that possible?</p>