Style range slider handles

Style range slider handles

Sorry if I have already posted this (I don't think it went through before my browser crashed!).

I currently use this code:

  1. $(document).ready(function() {
  2.     handle = $('.slider A.ui-slider-handle');        
  3.     handle.eq(0).addClass('left-handle');        
  4.     handle.eq(1).addClass('right-handle');
  5. });
to add a class to the left and right handles of my range slider but if I add more than one slider to the same page this code only seems to add the classes to the first slider on the page and not all of them.

Any ideas how I can add these to all sliders?