因此,我使用的是,我試圖從任何pickadate事件處理函數中引用DOM中的日期對象。引用內部事件處理函數中的當前DOM元素(pickadate.js)
例如,我希望能夠說:
onClose: function() {
var $this = ?; // <-- How do I define $this?
$this.fadeOut();
}
問:
如何從裏面的這些事件處理功能之一是指當前的DOM元素?
注:
this, $(this) and $this don't seem to work :-(
代碼:
var dates = $('.dates');
dates.pickadate({
today: t,
format: f,
clear: false,
min: min,
max: max,
selectYears: sy,
selectMonths: sm,
firstDay: fd,
formatSubmit: f2,
hiddenSuffix: s,
onClose: function() {
var $this = ?; // <-- How do I define $this?
$this.fadeOut();
}
});
你可以添加你的html和js代碼嗎? – Pedram
嗯...我發現這個'在所有這六個事件的範圍內,這是指picker.'在這個頁面的末尾http://amsul.ca/pickadate.js/date/ –