(function($){ jQuery.f2c = function(option) { var opts = jQuery.extend( {}, jQuery.f2c.default, option); return (opts.fahrenheit-32) * 5/9; }; jQuery.f2c.default = { fahrenheit: 32 }; })(jQuery); $(document).ready(function() { document.write($.f2c() +"<br/>" + $.f2c({fahrenheit: 212})); });
<p> </p>