> Instead, make your code a static function: Mike,
You're a huge help! That all makes much more sense now. Here is what I ended up with: (function( $ ) { $.rjax = function(options) { $.ajax($.extend({ dataType: "script", beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");} }, options)); } $.remoteLink = function(selector, options) { $(function() { $(selector).click( function() { $.rjax($.extend({ url: this.href }, options)); return false; }); }); }; })( jQuery ); jQuery.remoteLink('#testhref'); Thanks! Joe