Trying to implement the javascript module pattern for the first time and having trouble with this code. The $.bind function is not throwing any errors and dropBox is not NULL, so I'm a bit puzzled. Am I missing something here?
var Application = (function(d, w, $) {
var drop, dragStart, dragEnter, dragOver, dragLeave;
drop = function(e) {
};
dragStart = function(e) {
};
dragEnter = function(e) {
};
dragOver = function(e) {
};
dragLeave = function(e) {
};
return {
init: function() {
var dropBox = $('#someid');
dropBox.bind('dragstart', dragStart);
dropBox.bind('dragenter', dragEnter);
dropBox.bind('dragover', dragOver);
dropBox.bind('drop', drop);
dropBox.bind('dragleave', dragLeave);
}
};
})(document, window, window.jQuery);