Extend jQuery JS Extend jQuery functionality to use functions globally but not increasing global name space. jQuery.extend({ percentage: function(a, b) { return Math.round((a / b) * 100) + '%'; } }); $.percentage(31.04, 100); // "31%"