Hi people I have the following code which works fine independandtly
but NOT when used together...

here's the code
[code]
$(document).ready
(
  function()
  {

    $("ul li div.info").hide();

    $("ul.profiles li h3").hover
    (
      function()
      {
        $(this).css({"cursor":"pointer"})
      }
      ,
      function()
      {
        $(this).css({"cursor":"default"})
      }
    );


    $("ul.profiles li h3").click
    (
      function()
      {
        var id = $(this).attr("id").split('-');

        if  (
            $("#info-"+id[1]).is(":hidden")
            )
        {
          $("#info-"+id[1]).slideDown("slow");
        }
        else
        {
          $("#info-"+id[1]).slideUp("slow");
          //alert($(this).attr("id"));
        }

      }
    );

    $("span.jargonterm").hover
    (
      function()
      {
        $(this).css({"cursor":"help"});
      }
      ,
      function()
      {
        $(this).css({"cursor":"default"});
        $(".jargonDesc").fadeOut(250,function(){ $
(".jargonDesc").remove();});
      }
    );

    $("span.jargonterm").click
    (
      function()
      {
        $(this).css({"cursor":"default"});
        var elID = $(this).attr("id").split('-');
        $(this).append('<div class="jargonDesc"><div><h3>'+$(this).text
()+'<h3>'+desc[elID[1]]+'</div></div>');
        $("div.jargonDesc").fadeIn(500);
      }
    );

    $.ajax
    (
      {
        type: "GET",
        url: "http://localhost/jargonterms.xml";,
        dataType: "xml",


        success: function(xml)
        {
          j=0;
          desc = new Array();
          $(xml).find('description').each
          (
            function()
            {
              var tmpD = $(this).text();
              desc[j++] = tmpD;
            }
          );

          var cont = $("#iContentHolder").html();

          j=0;
          $(xml).find('term').each
          (
            function()
            {
              term = $(this).text();
              cont = cont.replace(term,'<span class="jargonterm"
id="term-'+j+'">'+term+'</span>');
              j++;
            }
          );
          $("#iContentHolder").html(cont);

       },

        error:  function (XMLHttpRequest, textStatus, errorThrown)
        {
          alert(textStatus);
        }

      }
    );
  }
);[/code]

all the code prior to the ajax call works fine IF I don't perform the
ajax call.  The ajax call works fine (except in IE where is doesn't
work at all and constantly yields 'parsererror' in the alert if the
ajax error is called).

I get no errors in my code any where and cannot for teh life of me
fathom why this is happening.

any help/guidance/pointers would be VERY muh appreciated.

Reply via email to