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>
$(document).ready(function(){
$.get("realisations.shtml",function(data) {
$('#realisations').empty().append(data);
$(".toexpand").hide();
})
});
<script>
$(document).ready(function(){
$.get("realisations.shtml",function(data) {
$('#realisations').empty().append(data);
$(".toexpand").hide();
});
});
</script>
is there a reason you aren't using $().load() ?
$(document).ready(function(){
$('#realisations').load("realisations.shtml", function() {
$(".toexpand").hide();
});
});
精彩评论