我的 mootools FX.slide 工作正常,但我希望内容在开始时隐藏,而不是在他们单击链接后隐藏。我已经用 jquery 完成了这个,我通常只是将类更改为 display:none; 但它与 mootools 不同。
我如何开始隐藏内容?
这是我所做的一个小提琴:
http://jsfiddle.net/ajrdesign/seVM7/
这是代码:
JS
var mySlide = new Fx.Slide('slider_content');
$('toggle').addEvent('click', function(e){
mySlide.toggle();
});
HTML
<li>
<h3>What can I do with Revu iPad?</h3>
<a id="toggle" href="#">Answer</a>
<div id="slider_content">
<p>Revu iPad includes some of the most popular features of Bluebeam Revu, enabling you to redline PDFs and collaborate with others on the go. Access PDFs through Dropbox, Box, iTunes, or WebDAV and redline PDFs with markup tools* including your existing tool sets. Additionally, collaborate with project partners across the globe in real time using Bluebeam Studio. </p>
<p>Revu iPad does not include all the features of Bluebeam Revu. Our app is designed to provide users with the features they need to document issues and collaborate in the field, without compromising speed.</p>
<p>*Measurement annotations are currently not supported.</p>
</div>
</li>
CSS
#slider_content {
padding: 10px;
margin: 20px;
border: 1px solid #e8e8e8;
border-radius: 4px;
}