Well, the problem still seems to be in the get() function. For example, IE gives the following error: Object doesn't support this property or method With: (function($) { $.fn.followUser = function(userId) { this.fadeOut(250, function(){ $.get('profile.php', { do: "addfriend", id: userId }, function (data){ return this.html('<p>Follower added</p>').fadeIn(250); }); }); } })(jQuery);
If I remove the whole $.get() part, the error is gone. Chrome will start fading out too. The code will then look like: (function($) { $.fn.followUser = function(userId) { this.fadeOut(250, function(){ }); } })(jQuery); I even tried replace the get() with ajax(), but ran into the same problem. Btw, thanks for the attr('rel') suggestion. This is something I was also looking for, but couldn't figure it out :) The html is now: <script type="text/Javascript"> $(function(){ $('div#followButton a').click(function(){ $('div#followButton a').followUser($(this).attr('rel')); }); }); </script> ... <div id="followButton"> <a rel="2">test1</a> </div> On Sep 26, 6:48 pm, Matt Quackenbush <quackfu...@gmail.com> wrote: > @ Mike - Thanks for making me take a closer look at the original code. I > get it now. My bad. > > /me crawls back into his cave to hibernate some more