trouble excluding child

trouble excluding child

Hi,
I'm doing a slidetoggle button on a p tag, but inside that p tag contains an a tag, I tried to exclude it by using the :not function, but it won't work. did I do something wrong in the html or css, or am I just wrong?

  1. <style>
  2. .alignright
  3. {
  4.     float: right;
  5. }
  6. </style>
  7. <p class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-top" style="font-weight:bold; color:#090;">
  8. <span class="alignright">Plate#: dsa-231</span>
  9.     Net Premium: Blah Blah Blah
  10.     <a href="<?php echo base_url();?>index.php/memboards/vdetails/<?php echo $list['VID'];?>" style="color:#006; display:inline;" class="link">(See Details)</a>
  11.     </p>
Here is the jquery code
  1. <script type="text/javascript">
  2. $(function()
  3. {
  4.   $('.ui-accordion-header, :not(div > .link))').click(function()
  5.     {
  6.         $(this).next('.ui-accordion-content').slideToggle();
  7.     });
  8. });
  9. </script>
Thanks