Frage

Hier ist der Code:

<script>
    $(document).ready(function(){
        $.get("realisations.shtml",function(data){$('#realisations').empty().append(data)});
    });
</script>

Ich brauche $ auszuführen hide () ( "toexpand.."); nach beeing sicher, dass die Daten in die div geladen

versuchen, diese nicht funktionieren:

<script>
    $(document).ready(function(){
        $.get("realisations.shtml",function(data){$('#realisations').empty().append(data)},function(){$(".toexpand").hide()});
    });
</script>
War es hilfreich?

Lösung

$(document).ready(function(){
    $.get("realisations.shtml",function(data) {
        $('#realisations').empty().append(data);
        $(".toexpand").hide();
    })
});

Andere Tipps

<script>
$(document).ready(function(){
    $.get("realisations.shtml",function(data) { 
       $('#realisations').empty().append(data);
       $(".toexpand").hide();
    });
});
</script>

gibt es einen Grund, warum Sie nicht mehr als $ verwenden (). Load ()?

$(document).ready(function(){
    $('#realisations').load("realisations.shtml", function() {
        $(".toexpand").hide();
    });
});
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top