Tag Archives: override

Web

Overriding methods in Javascript

js_override
To override any method in JS+jQuery, use:

$(function(){
  SomeObject.prototype.someMethodName = function() {
    alert('Is overriden !!!');
  }
});

Ex is http://code.google.com/p/primefaces/issues/detail?id=4291
https://gist.github.com/sgruhier/1086231