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;
}