When creating jQuery custom utility functions always use this pattern because it protects the use of $. (function($){ $.foo = function(argument) {alert(argument);} })(jQuery)