Jump to content

Recommended Posts

Hello

 

I am trying to use this nice javscript: http://demos.mootools.net/Fx.Slide

 

I want to use only the Vertical one.

 

So I deleted this piece of code from index.html

<h3 class="section">Horizontal</h3>
<div class="marginbottom">
	<a id="h_slideout" href="#">slide out</a>
	|
	<a id="h_slidein" href="#">slide in</a>
	|
	<a id="h_toggle" href="#">toggle</a>
	|
	<a id="h_hide" href="#">hide</a>
	|
	<a id="h_show" href="#">show</a>
	| <strong>status</strong>: <span id="horizontal_status">open</span>
</div>
<div id="horizontal_slide">
	Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>

 

But i can see an error in the status bar: you may see it here: http://www.dmcpublisher.com/Fx.Slide/

 

Another question: How do I make the default status of this vertical Closed? when i toggle it, it opens. I don't need the other show/hide options

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/125762-solved-helo-with-mootools-script/
Share on other sites

it's because you still have the javascript for the horizontal one in your demo.js.

remove all the horizontal events.

 

as for having it closed by default.

 

you could do this.

 

<script>
window.addEvent('domready', function() {
   
   var myVerticalSlide = new Fx.Slide('vertical_slide');
   //add this after you instantiate the Slide object to close it at the start
   myVerticalSlide.hide();
});
</script>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.