2011-02-08 4 views
0

hoverIntent가 제대로 작동하는 데 문제가 있습니다. 내가 다른 사업부로 변경하면hoverIntent의 다양한 속도 문제

  • 는 종종, 호버는 마우스 오버의 결과로 나타나지 않습니다 :

    문제가 나타나는 유지한다. 제가 약간 옮기면 나타나지 않을 것입니다. 나는 마우스를 바깥으로 가져 가야하고 다시 작동시켜야합니다.

  • 가끔씩 불투명도가 매우 낮으며 크기가 잘못되었습니다. slideUp() 부분의 마지막 단계에서 얼어 버린 것 같습니다. (캘린더 -> 일) 나는

     $(".info").hoverIntent({ 
          over: show, 
          out: hide 
         }); 
    
    function show(){ 
        if($("#inndato").html() == " ") { 
         // To give the popup-div position close to the mouseover-div 
         var position = $(this).position(); 
         $("#arrinfo").css({ "left": (position.left + $(this).width()) + "px", "top":position.top + "px", "position":"absolute" }); 
         $("#arrinfo").html(ajax_load).load(loadUrl); 
         $("#arrinfo").show(); 
        } 
    } 
    
    function hide(){ 
        $("#arrinfo").stop().slideUp("fast"); 
    }

내가 DIV의 많이 가지고 ...이 작업을 얻기 위해 페이지를 새로 고침해야하고, 정보 수준에 할당 된이 - 업 팝를 활성화해야 id #inndato로 div하십시오.

답변

0

실제로 Ajax가 반환되기 전에 실제 .show()가 실행될 수 있다고 생각합니다. Show() 함수를 .load() 호출의 'success'섹션으로 옮겼습니다. 나는 'ajax_load'가 반환 결과이고 당신의 부분에 오타가되었다는 한 가정을했다. 'ajax_load'변수가 있으면 뭔가 사과하고 사과 드리겠습니다.

function show(){ 
     if($("#inndato").html() == " ") { 
      // To give the popup-div position close to the mouseover-div 
      var position = $(this).position(); 
      $("#arrinfo").css({ "left": (position.left + $(this).width()) + "px", "top":position.top + "px", "position":"absolute" }); 
      //below duplicates the work of 'load', unless something special is in ajax_load    //that i don't know about 
    //$("#arrinfo").html(ajax_load).load(loadUrl); 
    //i think you mean this 
      $("#arrinfo").load(loadUrl, function(data,text,xhr){ 
       //$("#arrinfo").show(); but try below first... 
       $(this).show(); 
      }); 

     } 
    } 
+0

@ Øyvind는 '#inndato'및 '#arrinfo'에 대해 자세히 알려 줄 수 있습니까? 왜 팝업 'div'컨트롤이 '#arrinfo'div를 다시로드합니까? 지금 당장 나타나므로 '#inndato'는 결코 채워지지 않을 것입니다. '#arrinfo'가됩니다. – DefyGravity