2011-06-30 9 views
5

Poniżej kod daje Zbyt dużo błędów rekurencji w jQuery okna dialogowego uijQuery UI dialogowe zbyt wiele problemów rekursji

$("#dialog-confirm").dialog({ 
     resizable: false, 
     height:140, 
     modal: true, 
     buttons: { 
      "Delete all items": function() { 
       $(this).dialog("close"); 
      }, 
      Cancel: function() { 
       $(this).dialog("close"); 
      } 
     }, 
        close:function(){ 
         $(this).dialog("close"); 
       } 
    }); 

Jak rozwiązać ten problem?

Odpowiedz

9

Występuje tu nieskończona rekurencja. Wystarczy zmienić

close:function(){ 
        $(this).dialog("close"); 
      } 

do

close:function(){ 

      } 
1

Może dlatego, że masz nieskończoną rekursję.

close:function(){ 
    $(this).dialog("close"); 
}