Strange error in jQuery 1.4

Strange error in jQuery 1.4

Morning peoples.

I keep getting the following error when i am working with some positioning in jquery


Permission denied to access property 'nodeType' from a non-chrome context



The code is below that triggers the error...



  1. $(document).ready(function(){



  2. $(".stacked-window").live("mouseenter", function(e){
      var element=$(this);
      var rand=$(this).find('.rand').val();
      var text=$("#stacked-tooltip-"+rand+"").html();
      var height=element.outerHeight();
      var left=Math.round(element.offset().left);
      var top=Math.round((element.offset().top - ( height / 2 ) ));
    $("<div/>",{
      id:     'tooltip-'+rand,
      'class': 'dock-tooltip',
          css :
            {
            'position':        'absolute',
            'z-index':        999,
            'left':            left+'px',
            'top':            top+'px',
            'display':         'none'
            },
        html : text
      }).appendTo("#container").show("fast");
    });
    $(".stacked-window").live("mouseleave", function(){
      var element=$(this);
      var rand=$(this).find('.rand').val();
      $("#tooltip-"+rand+"").remove();


    });




























  3. $("#dock-hover").mouseenter(function(){
        $("#dock").fadeIn("fast");
    });
    $("#dock-hover").mouseleave(function(){
        $("#dock").fadeOut(400);




  4. });
  5. }); // end document ready    
Basically the code listens for a mousenter event on a target area and shows an element behind it then inside that element are other elements that have mouseenter bound in live() to show a tooltip.



The error does not happen all the time - only when i seem to mouseleave the tooltip element quickly and the hover element...



Has anyone every encountered a problem like this or is it a known bug ?



Thanks in advance



/Alex