我希望在页面加载时折叠所有标签页。现在,第一个默认是打开的:
$(document).ready(function($) {
$('#forms').find('.forms-toggle').click(function(){
//Expand or collapse this panel
$(this).next().slideToggle('fast');
//Hide the other panels
$(".forms-content").not($(this).next()).slideUp('fast');
});
});
HTML和CSS在这里:
答案 0 :(得分:0)
将它放在dom中,
$(".forms-content").hide();
然后代码将是,
$(document).ready(function($) {
$(".forms-content").hide();
$('#forms').find('.forms-toggle').click(function() {
//Expand or collapse this panel
$(this).next().slideToggle('fast');
//Hide the other panels
$(".forms-content").not($(this).next()).slideUp('fast');
});
});
答案 1 :(得分:0)
还请你改进JS:
<?php
$files = glob('/images/pic/sound/*.mp3');
for ($i=0; $i<count($files); $i++)
{
$num = $files;
echo date ("F d Y H:i:s.", filemtime($num))."<br><br>";
echo '<audio src="'.$num.'" autostart="true" loop="infinite"></audio>'."<br><br>";
}
?>