Highlight weeks in datepicker

Highlight weeks in datepicker

Hello,

i'm trying to highlight weeks in the datepicker. Since i updated my jQuery UI to v1.10 it does not work anymore. (I used v1.8.14 before).

Here is my code that worked well before : 

  1.   $( "#top10week" ).datepicker({
  2.         dateFormat: "yy-mm-dd",
  3.         firstDay: 1,
  4.         showOtherMonths: true,
  5.         selectOtherMonths: true,
  6.         changeMonth: true,
  7.         changeYear: true,
  8.         showWeek: true,
  9.         beforeShow: function(dateText, inst) { 
  10. $(".ui-datepicker-calendar tbody tr").on("mousemove", function() { 
  11.                 $(this).find('td a').addClass("ui-state-hover"); 
  12.             });
  13.             $(".ui-datepicker-calendar tbody tr").on("mouseleave", function() { 
  14.                 $(this).find('td a').removeClass("ui-state-hover");
  15.             });
  16.         },
  17.         onClose: function(dateText, inst) { 

  18.             // disable live listeners so they dont impact other instances
  19.             $(".ui-datepicker-calendar tbody tr").off("mousemove");
  20.             $(".ui-datepicker-calendar tbody tr").off("mouseleave");

  21.         }
  22.     });
And now, it looks like the .on() in the beforeShow is not run anymore (but beforeShow is fired). But if I try it in my browser (using firebug), it works well.. it's just like if the html nodes were not already in the html.. 

Any idea to solve my problem?

Regards