How can i access to this.today inside of the Moved function? It will be called via jQuery so the this keyword will be overwritten by jQuery to jQuery object or a DOM element.
Here is something similar to what I have:
(function(Map) {
Map.Timeline = {
today: null,
Init: function () {
jQuery("#timeline").mousemove(Map.Timeline.Moved); // or this.Moved
},
Moved: function (event) {
console.log(this); // jQuery Object or DOM element
console.log(this.today); // fails
console.log(Map.Timeline.today); // works fine
},
// more code here ...
this = Map.Timeline