Animate在Chrome中不起作用

时间:2014-10-31 00:46:15

标签: javascript jquery css google-chrome

请查看http://ipll.manoa.hawaii.edu/ind/tiw/lessons/L22/index.htm

如果您搜索" kata baru"然后单击链接,它会在侧栏中打开文件daftar_kata.htm。这在Safari和Firefox中很有用,但Chrome中不显示该文件的内容。我在这里复制了代码,但似乎问题是由文件daftarkata.css中的css代码引起的。当我重命名daftarkata.css时Chrome会显示内容(当然不是格式)。因此我也复制了css代码。

非常感谢!!



<script type="text/javascript">
$(document).ready(function(){
$(function () {
$("#sidebar2inner").load("daftar_kata.htm table");
});
});
$(function() {
    
    var $sidebar = $('#sidebar2'), $splitter = $('[id^=splitter]'), $close = $('.close');
    $('#sidebar2').hide();
    $splitter.toggle(
        function() { 
            $sidebar.animate({ width: 'show' }, 400);
            $('#page').animate({marginLeft: '0px'}, 'slow');
        },
        function() {
            $sidebar.animate({ width: 'hide' }, 400);
            $('#page').animate({margin: '0 auto'}, 'slow');
        }
    );
        
     
    $splitter.height( $('#main').height() );
    
    $close.click(function(){
            $sidebar.animate({ width: 'hide' }, 400);
            $('#page').animate({margin: '0 auto'}, 'slow');
    });
    
   	var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36];
    jQuery.each(arr, function(index, item) {
        $('#transkrip' + item + 'Container').hide();
    });
    jQuery.each(arr, function(index, item) {
    		$('#transkrip' + item).toggle(
    			function() {
    				$('#transkrip'+item+'Container').animate({height:'show'},400);
    			},
    			function(){
    				$('#transkrip'+item+'Container').animate({height:'hide'},400);
    			}
    		);
    });

});
</script>
&#13;
&#13;
&#13;

CSS代码

&#13;
&#13;
.daftarkata {

	margin:0px;padding:0px;

	width:100%;
	box-shadow: 10px 10px 5px #888888;

	border:1px solid #b2b2b2;

	

	-moz-border-radius-bottomleft:14px;

	-webkit-border-bottom-left-radius:14px;

	border-bottom-left-radius:14px;

	

	-moz-border-radius-bottomright:14px;

	-webkit-border-bottom-right-radius:14px;

	border-bottom-right-radius:14px;

	

	-moz-border-radius-topright:14px;

	-webkit-border-top-right-radius:14px;

	border-top-right-radius:14px;

	

	-moz-border-radius-topleft:14px;

	-webkit-border-top-left-radius:14px;

	border-top-left-radius:14px;

}table.daftarkata{

	width:100%;

	height:100%;

	margin:0px;padding:0px;

}table.daftarkata tr:last-child td:last-child {

	-moz-border-radius-bottomright:14px;

	-webkit-border-bottom-right-radius:14px;

	border-bottom-right-radius:14px;

}

table.daftarkata tr:first-child td:first-child {

	-moz-border-radius-topleft:14px;

	-webkit-border-top-left-radius:14px;

	border-top-left-radius:14px;

}

table.daftarkata tr:first-child td:last-child {

	-moz-border-radius-topright:14px;

	-webkit-border-top-right-radius:14px;

	border-top-right-radius:14px;

}table.daftarkata tr:last-child td:first-child{

	-moz-border-radius-bottomleft:14px;

	-webkit-border-bottom-left-radius:14px;

	border-bottom-left-radius:14px;

}table.daftarkata tr:hover td{

	background-color:#e5e5e5;

		


}

table.daftarkata td{

	vertical-align:top;

	

	background-color:#ffffff;


	border:1px solid #b2b2b2;

	border-width:0px 1px 1px 0px;

	text-align:left;

	padding:7px;

	font-size:10px;

	font-family:Verdana;

	font-weight:normal;

	color:#000000;

}table.daftarkata tr:last-child td{

	border-width:0px 1px 0px 0px;

}table.daftarkata tr td:last-child{

	border-width:0px 0px 1px 0px;

}table.daftarkata tr:last-child td:last-child{

	border-width:0px 0px 0px 0px;

}

table.daftarkata tr:first-child td{

		background:-o-linear-gradient(bottom, #ffffff 5%, #e5e5e5 100%);	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #e5e5e5) );
	background:-moz-linear-gradient( center top, #ffffff 5%, #e5e5e5 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff", endColorstr="#e5e5e5");	background: -o-linear-gradient(top,#ffffff,e5e5e5);


	background-color:#ffffff;

	border:0px solid #b2b2b2;

	text-align:center;

	border-width:0px 0px 1px 1px;

	font-size:17px;

	font-family:Verdana;

	font-weight:bold;

	color:#33aacc;

}

table.daftarkata tr:first-child:hover td{

	background:-o-linear-gradient(bottom, #ffffff 5%, #e5e5e5 100%);	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #e5e5e5) );
	background:-moz-linear-gradient( center top, #ffffff 5%, #e5e5e5 100% );
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff", endColorstr="#e5e5e5");	background: -o-linear-gradient(top,#ffffff,e5e5e5);


	background-color:#ffffff;

}

table.daftarkata tr:first-child td:first-child{

	border-width:0px 0px 1px 0px;

}

table.daftarkata tr:first-child td:last-child{

	border-width:0px 0px 1px 1px;

}
&#13;
&#13;
&#13;

0 个答案:

没有答案