jquery post data response

jquery post data response


I am getting a data response from post in the form of
variable1 | variable2
I am having trouble splitting these and applying each value to where
its needed
$.post($(this).attr("href")),{},
function(data)
    {
update = data.split('|');
$(update[0]).replaceWith(update[1]);
    };
return false;
Thanks
Tom