jQuery and function scope
- by Jason
Is this:
($.fn.myFunc = function() {
var Dennis = function() { /*code */ }
$('#Element').click(Dennis);
})();
equivalent to:
($.fn.myFunc = function() {
$('#Element').click(function() { /*code */ });
})();
If not, can someone please explain the difference, and suggest the better route to take for both…