即时通讯使用jquery ajax方法加载不同的内容div,我的内容div(每次单击链接时都会被替换的div)已经溢出:自动CSS,但是当我加载页面时,它向我的页面添加了另一个滚动条像这样的内容div ...
每个页面何时真正看起来像这样...
这是我的js ...
$(document).ready(function() {
var hash = window.location.hash.substr(1);
var href = $('#links li a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-4)){
var toLoad = hash+'.html #cont';
$('#cont').load(toLoad)
}
});
$('#links li a').click(function(){
var toLoad = $(this).attr('href')+' #cont';
$('#cont').hide('fast',loadContent);
$('#load').remove();
$('#wrap').append('LOADING...');
$('#load').fadeIn('normal');
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-4);
function loadContent() {
$('#cont').load(toLoad,'',showNewContent())
}
function showNewContent() {
$('#cont').show('fast',hideLoader('fast'));
}
function hideLoader() {
$('#load').fadeOut('normal');
}
return false;
});
});
这是我的内容部门的CSS ...
#cont {
overflow:auto ;
margin:0 auto ;
width:736px ;
height:341px ;
padding: 0 0 0 6px ;
}
谁能想到增加额外滚动条的原因,还是有人能想到解决方法?
我正在使用PHP包含文件来加载我的内容...
I.C.T - St. Patrick's Academy, Lisburn