So I'm using http://amsul.ca/pickadate.js/ and I'm trying to reference a date object in the DOM from within any of the pickadate event handlers.
For example I want to be able to say:
onClose: function() {
var $this = ?; // <-- How do I define $this?
$this.fadeOut();
}
Question:
How do you refer to the current DOM element from inside one of these event handler functions?
Note:
this, $(this) and $this don't seem to work :-(
Code:
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();
}
});