Frage

die folgenden Zeilen Code gegeben, die jQTouch verwendet, ist:

$('#customers').bind('pageAnimationEnd', function(e, info){
    if (!$(this).data('loaded')) {                     
        $('.loadingscreen').css({'display':'block'});
        $(this).append($('<div> </div>').        
            load('/mobile/ajax/customers/ .info', function() {        
                $(this).parent().data('loaded', true); 
                $('.loadingscreen').css({'display':'none'});
            }));
    }
});

Wie ich Fahrt des .append bekommen ($ (‘‚). Früher war es append ($ ( ‚Laden‘), aber ich habe nicht brauchen das und jetzt ist es wie eine Verschwendung scheint die Zeit der Verarbeitung in der Funktion zu haben.

Ist es möglich?

War es hilfreich?

Lösung

 $(this).append($('<div> </div>').        
            load('/mobile/ajax/customers/ .info', function() {        
                $(this).parent().data('loaded', true); 
                $('.loadingscreen').css({'display':'none'});
            }));

wird

 $(this).load('/mobile/ajax/customers/ .info', function() {        
                $(this).parent().data('loaded', true); 
                $('.loadingscreen').css({'display':'none'});
            });
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top