我已經準備好了mootools FX.slide,但我希望內容在開始時隱藏,而不是在點擊鏈接後隱藏。我已經完成了這與jquery,我通常只是改變類顯示:無;但它與mootools不一樣。在開始而不是點擊後隱藏FX.slide內容
我該如何開始隱藏內容?
這裏是我做了什麼小提琴:
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;
}