Question

I'm trying to do a simple JQuery UI module that shows a menu from left to right with "drop" effect.

I'm using Jquery UI 1.10.3 and Jquery 2.0.3.

My problem: If menu comes from left the menu background jumps from bottom to top and viceversa.

This is my code, you can check my problem here: http://jsfiddle.net/yrhTS/

> First JavaScript function made an alternative to JQuery deprecated .toggle().

Thank you very much in advance!

Was it helpful?

Solution

Add padding:2px; to your #articleleftmenu will solve your problem.

Check this JSFiddle

FYI:

There is a difference between .toggle() and .toggle() event

See documentation:

  1. .toggle()
  2. .toggle() event

So you use .toggle() normally as below.

$('.sections').on('click', function() {
           $( "#articleleftmenu" ).slideToggle( "left" );
}); 

Check this Updated JSFiddle.

Hope you understand.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top