Simple Javascript problem

Simple Javascript problem

I am new to javascript and have a problem. I am trying to get a hash and pass the tag to a url but I am getting undefined as a result. I am sure it is a simple markup issue but can't for the life of me figure it out.

Thanks in advance
  1.   $("#nest-tabs li a").click(function() {
  2.   //alert("On the top nav:..."+(this).hash+" was clicked!");
  3.   var hashStr = location.hash.replace("#","");
  4.   $.post('form.php?toptab='+(this).hashStr+'', function(html) {
  5. $('#result').html(html);
  6. });
  7. });