tags:

views:

28

answers:

3

here is the code :

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

I need to execute $(".toexpand").hide(); after beeing sure the data is loaded into the div

this try dont work :

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

is there a reason you aren't using $().load() ?

$(document).ready(function(){
    $('#realisations').load("realisations.shtml", function() {
        $(".toexpand").hide();
    });
});
Scott Evernden