[eluser]Nick Husher[/eluser]
I'm not familiar with jQuery, but is the type of argument
e to your anonymous function a Javascript event? If that's the case, then saveChangesTitle isn't a function defined by Event, and you should probably find a less messy way of including it in your event handler. Here's how I'd do it:
Code:
(function() {
var saveChangesTitle = function(element, revert, i, title_id) {
...
};
jQuery('.eip-text').keydown(
function(e) {
if (e.keyCode == 13) {
saveChangesTitle(this, revert, i, title_id);
}
});
})();
Note, if you really want to define saveChangesTitle on your event object, you'd do it by executing the following code:
Code:
Event.prototype.saveChangesTitle = function(el, revert, i, title_id);