我正在从 AnySlider 创建一个网站,并希望在面板内使用 jQuery UI 的手风琴功能,并且整个页面都在床上。所有对 js 和 css 的引用都有效。现在新闻...
<script type="text/javascript">
// Set up Sliders
// **************
$(function(){
$('#slider').anythingSlider({
startPanel : 1,
buildArrows : false,
autoPlay : false,
width : 600, // if resizeContent is false, this is the default width if panel size is not defined
height : 350, // if resizeContent is false, this is the default height if panel size is not defined
resizeContents : false, // If true, solitary images/objects in the panel will expand to fit the viewport
startStopped : true, // If autoPlay is on, this can force it to start stopped
navigationFormatter : function(index, panel){ // Format navigation labels with text
return ['home', 'menu', 'find us', 'order online', 'cater', 'contact'][index - 1];
}
});
$("#accordion").accordion({ header: "h3" });
});
</script>
在体内:
<li class="panel2">
<div id="accordion">
<div>
<h3><a href="#">First</a></h3>
<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
</div>
<div>
<h3><a href="#">Second</a></h3>
<div>Phasellus mattis tincidunt nibh.</div>
</div>
<div>
<h3><a href="#">Third</a></h3>
<div>Nam dui erat, auctor a, dignissim quis.</div>
</div>
</div>
</li>