$('a[@href*=fling]').parent().parent().addClass('ajaxClick'); $('
').insertAfter(".ajaxClick"); $('.ajaxClick a').click(function(){ $(this).parentNode.parentNode.nextSibling.load(this.href, function(){ // I'm getting an error here. Firebug says "$(this) has no properties" $('.newDiv>div, .newDiv>table, .newDiv>p:first, .newDiv>p:last table:lt(2)').hide(); $(".newDiv p").css("margin", "0"); }); var divHite = $('.newDiv>p:last table:gt(1)').height(); $(this).parentNode.parentNode.nextSibling.animate({height: divHite}, 500); return false});