3

I want to add a hover to all .ui-state-default elements (cells) of a datepicker. The hover uses class information added by the beforeShowDay function. I need a way to be able to rebind the hover whenever the calendar is re-rendered by changing months/year.

I've tried beforeShow, but it is only called on the first time the datepicker is displayed.

I've tried the onChangeMonthYear, but it is called prior to beforeShowDay, so any hovers I add are on the previous months .ui-state-default elements. Is there a way to bind to the datepicker after the beforeShowDay has been called? Thanks!

10
  • Can you show us some script? Commented Jan 25, 2013 at 17:14
  • I have a similar issue before that i resolved with the setTimeout function. eg: setTimeout(someFunction,1);. Dirty, but works.
    – lante
    Commented Jan 25, 2013 at 17:17
  • Why not use on() with delegated events? api.jquery.com/on
    – isherwood
    Commented Jan 25, 2013 at 17:21
  • Here is an example: jsfiddle.net/Pfdj8/3 Commented Jan 25, 2013 at 17:21
  • What's the hover effect you're demonstrating?
    – isherwood
    Commented Jan 25, 2013 at 17:22

0

Browse other questions tagged or ask your own question.