Adding Prototype Methods to jQuery
A quick search gave us an easy solution; by adding a prototype property (not related to the Prototype framework) to String.prototype we can give every
E.g. we wanted to add the endsWith() and startsWith() functions on any String object which basically checks a string for a suffix or prefix:
1 2 3 4 5 6 7 8 9 10 11
Note that I wrapped these additions in a function called utilityInit() which I run on document ready…so I can access them anytime I need.