stop immediate propagation

stop immediate propagation

I have a question concerning this piece of code:
  1. $(document).ready(function(){    
  2. $(document).on('slidestop',function(event, data){
  3.       event.stopImmediatePropagation();
  4. });
  5. });

It is meant to prevent double triggering by slide menu.

Does it matter where in the code it is placed ? It is not restricted to one slider, but affects all the menus of this kind, yes?