سؤال

وهنا هو رمز:

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

وأحتاج لتنفيذ $ اخفاء () ( "toexpand.")؛ بعد بيينغ تأكد من تحميل البيانات في شعبة

وهذه محاولة لا يعمل:

<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>

وهناك سبب لا تستخدمها $ (). الحمولة ()؟

$(document).ready(function(){
    $('#realisations').load("realisations.shtml", function() {
        $(".toexpand").hide();
    });
});
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top