2014-07-25 2 views
-1

입력이 포커스를 잃고 특정 조건이 충족 될 때까지 계속 표시 할 때 팝 오버를 표시 할 수 있습니까? 나는 마지막 부분을 처리했지만, popover는 입력을 두 번 클릭했을 때만 보여줍니다.입력이 포커스를 잃었을 때 popover를 표시하는 방법?

는 여기에 지금까지이 작업은 다음과 같습니다

$.ajax({ 

     type : "post", 
     url  : "dnivalidation", 
     data : {dni : dni} 
    }).success(function(){ 
     console.log("ID not found, you can proceed with registration"); 
    }).fail(function(){ 

     $("#per_dni").popover({ 
      html : true, 
      title : 'User already exists', 
      content : 'Do you want to mak an <a href=schedule.jsp>appointment</a>?' 
     }); 

     $("#rClient").attr("disabled", "disabled"); 

    }); 

답변

0

는이를 추가합니다. . .

.... 

    $("#per_dni").popover({ 
     html : true, 
     title : 'User already exists', 
     content : 'Do you want to mak an <a href=schedule.jsp>appointment</a>?' 
    }); 

    $("#per_dni").focusIn(function(){ 
     $(this).popover('show'); 
    }); 

    .... 

그리고, 다른 기능에서 다음에 전화 ...

$("#per_dni").popover('hide'); 

이 ... 그것을 숨길 */

관련 문제