سؤال
وهنا هو رمز:
<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();
});
});
لا تنتمي إلى StackOverflow