开发者

How to trigger onShow callback for Keith Wood jQuery datepicker?

Using Keith Wood's datepicker how can I trigger a callback before the datepicker is shown so I can set the picker's parameters? Using the code below the callback (alert) is shown on page ready and开发者_StackOverflow社区 not before the datepicker is shown.

$(function(){
   $( ".inputDatePick").datepick({ onShow: alert('on show callback') });
});

....

<input type="text" class="inputDatePick" />


doh! the correct syntax for a callback is a function :

$(function(){
   $( ".inputDatePick").datepick({ onShow: function () { alert('on show callback') } });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜