0
我想在页面加载时显示#destiny2
。 #destiny2
包含一些文字和图像,其他内容适用于任何3类。我必须点击category元素才能显示它 - 显示第一个内容时不需要点击,显示第一个内容(页面加载后默认显示第一个类别),并在点击类别名称后显示其他两个类别内容,因为它现在起作用。通过deafult使用jQuery加载div内容
我敢肯定$window(onload)
应该修复它,但它不为我工作...
这是我的代码:
if($(response).hasClass('one')){
$('.ajax-destiny #destiny1').empty();
var odp = $('.ajax-destiny #destiny2').empty().append(response).parent().addClass('height');
$(odp).find('.one > #cont').append($('#information').html());
} else {
$('.ajax-destiny #destiny2').empty();
$('.ajax-destiny #destiny1').empty().append(response).parent().addClass('height');
}