[jQuery] Re: code minimization / abstraction

2007-09-05 Thread Joe Noon
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,

[jQuery] Re: code minimization / abstraction

2007-09-05 Thread Joan Piedra
On 9/4/07, Michael Geary [EMAIL PROTECTED] wrote: $('#testhref').click( function() { Hey Michael, looks like you missed the selector variable here =p $(selector).click( function() { This should work. Regards, -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/

[jQuery] Re: code minimization / abstraction

2007-09-05 Thread Michael Geary
From: Michael Geary $('#testhref').click( function() { From: Joan Piedra Hey Michael, looks like you missed the selector variable here =p $(selector).click( function() { Oops... Good catch, Joan, thanks! -Mike

[jQuery] Re: code minimization / abstraction

2007-09-04 Thread Michael Geary
Your coding skills are fine, that's not the problem here. :-) The problem is that you can't do what you want in exactly the form you were aiming for: jQuery('#testhref').RemoteLink(options); When you call jQuery('#testhref'), the testhref element needs to exist. You can't hide the